Re: This table won't use INDEX until I DUMP/RESTORE it ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: This table won't use INDEX until I DUMP/RESTORE it ?
Дата
Msg-id 29274.1061503507@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: This table won't use INDEX until I DUMP/RESTORE it ?  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список pgsql-admin
Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> That was more to get its idea for the cost of the index scan.
> As a short term thing, if you havent played with random_page_cost,
> I'd suggest lowering it from the default 4 to say 3 or 2 and see
> what plan it gives you.

Given the closeness of the two cost estimates, random_page_cost
shouldn't need to be moved much at all to flip the plan choice to
indexscan for this particular query.  You might want to move it more
so that the ratio of the estimates approximates reality, but I advise
caution on that, or at least caution on using this example as the
test case.  There's a fairly large misestimate of the number of returned
rows in there too, and so if you use this case you'll be conflating
the effects of that misestimate with the effects of random_page_cost
being wrong for your environment.

            regards, tom lane

В списке pgsql-admin по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Indexing a boolean
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: Indexing a boolean