Re: why sequential scan is used on indexed column ???

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: why sequential scan is used on indexed column ???
Дата
Msg-id 17123.1213468538@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: why sequential scan is used on indexed column ???  (Michael Fuhr <mike@fuhr.org>)
Ответы Re: why sequential scan is used on indexed column ???  (Julius Tuskenis <julius.tuskenis@gmail.com>)
Re: why sequential scan is used on indexed column ???  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
Michael Fuhr <mike@fuhr.org> writes:
> I created a test case that has close to the same estimated and
> actual row counts and has the same plan if I disable enable_nestloop:

There's something weird about this --- why does the second plan seqscan
b_saskaita, instead of using the bitmap scan that it had previously
estimated to be cheaper?  What PG version are you testing, and can you
provide the full test case?

(As for the original question, the hash plan seems to me to be perfectly
reasonable for the estimated row counts --- fetching one row out of
fifty using an indexscan is going to be expensive.  So I think the OP's
problem is purely a statistical one, or maybe he's in a situation where
he should reduce random_page_cost.)

            regards, tom lane

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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: why sequential scan is used on indexed column ???
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: dblink() cursor error/issue (TopMemoryContext)