Re: query with offset stops using index scan

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: query with offset stops using index scan
Дата
Msg-id 20080831195421.GB3856@alvh.no-ip.org
обсуждение исходный текст
Ответ на query with offset stops using index scan  ("Stanislav Raskin" <sr@brainswell.de>)
Список pgsql-general
Stanislav Raskin wrote:

> Now, if I increase OFFSET slowly, it works all the same way, until OFFSET
> reaches the value of 750. Then, the planner refuses to use an index scan and
> does a plain seq scan+sort, which makes the query about 10-20 times slower:

You may want to try setting enable_seqscan to off before that query (and
making sure you turn it back on; preferably use SET LOCAL inside a
transaction block) so that it gives more preference to the indexscan.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: integer values in conf file
Следующее
От: M2Y
Дата:
Сообщение: Oracle and Postgresql