Re: Slow query + why bitmap index scan??

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Florian Weimer" <fweimer(at)bfk(dot)de>, "Laszlo Nagy" <gandalf(at)shopzeus(dot)com>
Cc: "Daniel Fekete" <danieleff(at)gmail(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Slow query + why bitmap index scan??
Date: 2011-01-12 14:36:55
Message-ID: 4D2D68270200002500039327@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Laszlo Nagy <gandalf(at)shopzeus(dot)com> wrote:

> shared_mem = 6GB
> work_mem = 512MB
> total system memory=24GB

In addition to the good advice from Ken, I suggest that you set
effective_cache_size (if you haven't already). Add whatever the OS
shows as RAM used for cache to the shared_mem setting.

But yeah, for your immediate problem, if you can cluster the table
on the index involved, it will be much faster. Of course, if the
table is already in a useful order for some other query, that might
get slower, and unlike some other products, CLUSTER in PostgreSQL
doesn't *maintain* that order for the data as new rows are added --
so this should probably become a weekly (or monthly or some such)
maintenance operation.

-Kevin

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Laszlo Nagy 2011-01-12 15:20:26 Re: Slow query + why bitmap index scan??
Previous Message Kenneth Marshall 2011-01-12 14:26:54 Re: Slow query + why bitmap index scan??