Subject: query plan worse after analyze
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 10/6/2007 1:50:03 AM
"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
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
|