Re: PostgreSQL performance question.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have been using PostgreSQL (currently 7.4.7) for several years now and am very happy with it but I currently run a website that has had a little bit of a boost and I am starting to see some performance problems (Not necessarily PostgreSQL).

PostgreSQL 8.1.1 should give you greater performance...

The database has been allocated 2Gb worth of shared buffers and I have tweaked most of the settings in the config recently to see if I could increase the performance any more and have seen very little performance gain for the various types of queries that I am running.

That sounds like far too many shared buffers? I wouldn't usually use more than a few tens of thousands, eg. 10k-50k. And that'd only be on 8.1 that has more efficient buffer management.

Get it into RAM hence the slight delay here. This delay has a serious impact on the user waiting in the web application.

# select * from test where text = 'uk' ;
Time: 477.739 ms

You need to show us the explain analyze plan output for this. But 477ms is far too slow for an index scan on a million row table.

max_fsm_pages = 500000 # I am thinking this might be a bit low.
max_fsm_relations = 1000

Maybe do a once-off vacuum full to make sure all your tables are clean?

Chris



[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux