From: Scott Marlowe <scott.marlowe@gmail.com>
To: Corin <wakathane@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: planer chooses very bad plan
Date: Sun, 11 Apr 2010 15:18:53 -0600
Message-ID: <o2jdcc563d11004111418pca3ad67dyda7e74d5252fd1c1@mail.gmail.com> (raw)
In-Reply-To: <4BC23B3E.5020500@gmail.com>
References: <4BC23B3E.5020500@gmail.com>
On Sun, Apr 11, 2010 at 3:12 PM, Corin <wakathane@gmail.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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: scott.marlowe@gmail.com, wakathane@gmail.com
Subject: Re: planer chooses very bad plan
In-Reply-To: <o2jdcc563d11004111418pca3ad67dyda7e74d5252fd1c1@mail.gmail.com>
References: <4BC23B3E.5020500@gmail.com> <o2jdcc563d11004111418pca3ad67dyda7e74d5252fd1c1@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox