Thread: How to improve Postgres performance

How to improve Postgres performance

From
Hemant Pandey
Date:



Hi All,
            I am running an application, which connects to the postgres
database at initialization time and perform the database operations like
Select/Update.
Database queries are very simple.
On analyzing my application through Quantifier( Performance analyzing
tool), I found the most of the time my application is waiting on recv,
waiting for Database response.
When i run Vacuum on perticular tables, i observed that performance
improoves drastically.

So please tell me how can i improve database performance through
configuration parameters. I had tried to change parameters in
postgresql.conf file but of no avail.
Now i am trying to Auto Vacuum, but don't know how to run Auto Vacuum.

Please help me to solve these problems.

Thanks in advance.
Hemant

***********************  FSS-Unclassified   ***********************
"DISCLAIMER: This message is proprietary to Flextronics Software
Systems Limited (FSS) and is intended solely for the use of the
individual to whom it is addressed. It may contain  privileged or
confidential information and should not be circulated or used for
any purpose other than for what it is intended. If you have received
this message in  error, please notify the originator immediately.
If you are not the intended recipient, you are notified that you are
strictly  prohibited  from  using, copying, altering, or disclosing
the contents of this message.  FSS  accepts no  responsibility  for
loss or damage arising from the use of  the information transmitted
by this email including damage from virus."


Re: How to improve Postgres performance

From
Dennis Bjorklund
Date:
On Tue, 30 Aug 2005, Hemant Pandey wrote:

> So please tell me how can i improve database performance through
> configuration parameters. I had tried to change parameters in
> postgresql.conf file but of no avail.
> Now i am trying to Auto Vacuum, but don't know how to run Auto Vacuum.

The most important part is that you need to run VACUUM ANALYZE regulary.
Vacuum can be started each night in a cron job, started from pg_autovacuum
when it thinks it's needed, or started in some other way. In any case, it
has to be run whenever the data in the database have changed enough.

The parameters in the config that is most important in my experience is
effective_cache_size and shared_buffers.

This is a text I like (it's for pg 7.4 but still useful):

  http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html

--
/Dennis Björklund