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.
In response to
pgsql-general by date
|Next:||From: David Fetter||Date: 2008-08-31 20:43:15|
|Subject: Re: Oracle and Postgresql|
|Previous:||From: M2Y||Date: 2008-08-31 18:29:32|
|Subject: Oracle and Postgresql|