From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Frost <jeff@frostconsultingllc.com>
Cc: 'PostgreSQL Performance' <pgsql-performance@postgresql.org>
Subject: Re: query plan worse after analyze
Date: Sat, 06 Oct 2007 01:50:03 -0400
Message-ID: <11261.1191649803@sss.pgh.pa.us> (raw)
In-Reply-To: <029201c807bc$f1642f60$120a0a0a@jefflap>
References: <029201c807bc$f1642f60$120a0a0a@jefflap>
"Jeff Frost" <jeff@frostconsultingllc.com> writes:
> Before analyze it seems to choose Bitmap Heap Scan on episodes
> current_episode, but after it chooses Index Scan Backward using
> index_episodes_on_publish_on on episodes current_episode.
Have you tried raising the stats target for "episodes"? Seems like
the problem is a misestimate of the frequency of matches for
season_id = something.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, jeff@frostconsultingllc.com
Subject: Re: query plan worse after analyze
In-Reply-To: <11261.1191649803@sss.pgh.pa.us>
* 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