Skip site navigation (1) Skip section navigation (2)

Re: planer chooses very bad plan

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Corin <wakathane(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: planer chooses very bad plan
Date: 2010-04-11 21:18:53
Message-ID: o2jdcc563d11004111418pca3ad67dyda7e74d5252fd1c1@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
On Sun, Apr 11, 2010 at 3:12 PM, Corin <wakathane(at)gmail(dot)com> wrote:
> Hi,
>
> I'm having a query where the planer chooses a very bad plan.

In both instances your number of rows estimated is WAY higher than the
actual number of rows returned.  Perhaps if you increased
default_statistics_target to 100, 200, 500 etc. re-analyzed, and then
reun explain analyze again.

Also increasing work_mem might encourage the bitmap index scans to occur.

In response to

Responses

pgsql-performance by date

Next:From: Luke LonerganDate: 2010-04-11 21:22:33
Subject: Re: planer chooses very bad plan
Previous:From: CorinDate: 2010-04-11 21:12:30
Subject: planer chooses very bad plan

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group