Re: optimizer bent on full table scan
От | Tom Lane |
---|---|
Тема | Re: optimizer bent on full table scan |
Дата | |
Msg-id | 12258.1045900386@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | optimizer bent on full table scan (Greg Stark <gsstark@mit.edu>) |
Ответы |
Re: optimizer bent on full table scan
|
Список | pgsql-general |
Greg Stark <gsstark@mit.edu> writes: > I have a strange problem with the optimizer from CVS checked out as of about a > week ago. It seems to be insisting on using a full table scan for a table > lookup where the full table scan is about 20x slower than an index lookup. > I think somehow it's being confused by the fact that some values of the index > are populated and others haven't been so the distribution is odd. Well, it's doing a heck of a good job of estimating the number of matching rows --- can't complain about 8757 vs 8721. So there's some other failure of modeling here. The only idea that comes to mind is that maybe the rows matching foobar_id = 900 are tightly clustered in the table, so that the planner's assumption of random fetches is overly pessimistic. But the small correlation value says that there's not much overall structure in the table's ordering. Can you shed any light on that? regards, tom lane
В списке pgsql-general по дате отправления: