Re: Postgresql takes more time to update

From: "Peter Koczan" <pjkoczan(at)gmail(dot)com>
To: "Suresh Gupta VG" <suresh(dot)g(at)zensar(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Postgresql takes more time to update
Date: 2007-10-06 17:30:12
Message-ID: 4544e0330710061030hd4a494y97b350076a76a17d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

>
> We are using "psql 7.4.2" version of Postgresql, these days all the
> transactions on the database are taking long time to execute. We are
> planning to do "ANALYZE" command on the database. Could you please advice
> us, how much time it takes and what are the conditions we need to keep on an
> eye.
>

As an alternative to Scott's suggestion (upgrading to the newest 7.4), you
could update your postgresql installation to 8.2, or if you can wait a few
months, 8.3. There are *huge* performance gains (I recently made a similar
switch and everything is blazing fast). Please note that this will require a
dump/restore of the data and more involved testing, so only do it if you can
devote the time, money, and energy.

As far as analyze goes, you should be running ANALYZE VERBOSE, or better
yet, VACUUM ANALYZE VERBOSE (see
http://www.postgresql.org/docs/7.4/interactive/sql-vacuum.html) so you can
interpret the output. The vacuum also helps manage disk space, and this
isn't a big performance hit because it doesn't require exclusive locks
(though a VACUUM FULL would, again, read the docs). In fact, you should be
doing this regularly, daily if possible.

For me, I have a 30 GB database cluster, and vacuum/analyze takes about 3
minutes, though YMMV. You want to look for output regarding FSM pages and
relations and adjust as necessary (otherwise you're running into index
bloat).

> Can you please tell us whether we had any other commands are available on
> postgresql to increase the performance of the database and database tools
> available for Postgresql on Solaris sparc machine?
>
I think Scott covered all of this. Alternatively, you could look to
upgrading your hardware (multi-core x86 hardware is very nice), but without
knowing your needs, usage, or budget, I can't make that determination.

Hope this helps.

Peter

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Darren Reed 2007-10-07 02:53:52 postgres: will not recognise existing tables
Previous Message Scott Marlowe 2007-10-05 21:40:40 Re: Postgresql takes more time to update