On Tue, Dec 27, 2011 at 12:29 PM, Jim Crate <jimcfl(at)gmail(dot)com> wrote:
> My question is why does it do a seq scan when it flattens this subquery into a JOIN? Is it because the emsg_messages table is around 1M rows? Are there some guidelines to when the planner will prefer not to use an available index? I just had a look through postgresql.conf and noticed that I forgot to set effective_cache_size to something reasonable for a machine with 16GB of memory. Would the default setting of 128MB cause this behavior? I can't bounce the production server midday to test that change.
You wouldn't need to bounce the production server to test that. You
could just use SET in the session you were testing from.
The Enterprise PostgreSQL Company
In response to
pgsql-performance by date
|Next:||From: Robert Haas||Date: 2012-01-11 01:53:32|
|Subject: Re: partitioned table: differents plans, slow on some situations|
|Previous:||From: Jesper Krogh||Date: 2012-01-10 21:42:35|
|Subject: Re: Query planner doesn't use index scan on tsvector GIN
index if LIMIT is specifiedQuery planner doesn't use index scan on tsvector
GIN index if LIMIT is specified|