Re: INDEX issues

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: INDEX issues
Дата
Msg-id 9504.1017849331@sss.pgh.pa.us
обсуждение исходный текст
Ответ на INDEX issues  ("Nicholay P. Chuprynin" <kolyan@infoport.uz>)
Список pgsql-admin
"Nicholay P. Chuprynin" <kolyan@infoport.uz> writes:
> I switched enable_seqscan to 'false', restarted server and EXPLAINed the
> same query again:
> ...
> Now it uses index scan, but query takes MUCH more time than before (about
> an hour, and it's not finished yet).
> It seems very strange for me.

Indexscan over a large fraction of a table is not a win compared to
a sequential scan.  Random access is just too expensive.

> Can someone explain what's wrong here?

Nothing.  The planner knew what it was doing to prefer the seqscan.

            regards, tom lane

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

Предыдущее
От: Trevor Astrope
Дата:
Сообщение: Data Loss After Restore?
Следующее
От: Dan Langille
Дата:
Сообщение: Re: Data Loss After Restore?