Re: query plan worse after analyze

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jeff Frost" <jeff(at)frostconsultingllc(dot)com>
Cc: "'PostgreSQL Performance'" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: query plan worse after analyze
Date: 2007-10-06 05:50:03
Message-ID: 11261.1191649803@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Jeff Frost" <jeff(at)frostconsultingllc(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jeff Frost 2007-10-06 06:41:05 Re: query plan worse after analyze
Previous Message Jeff Frost 2007-10-06 04:12:20 Re: query plan worse after analyze