On Thu, Jul 9, 2009 at 3:34 PM, Alex<alex@xxxxxxxxxx> wrote: > Below is a query that takes 16 seconds on the first run. I am having > generally poor performance for queries in uncached areas of the data > and often mediocre (500ms-2s+) performance generallly, although > sometimes it's very fast. All the queries are pretty similar and use > the indexes this way. > > I've been trying to tune this thing with little luck. There are about > 1.5M records. It's using the index properly. Settings are: > work_mem=20MB, shared_buffers=128MB, effective_cache_size=1024MB. > > I have run ANALYZE and VACUUM FULL recently. Note that vacuum full can bloat indexes, good idea to reindex after a vacuum full. -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance