Re: [GENERAL] query with offset stops using index scan

2008-08-31 Thread Alvaro Herrera
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_seqsc

Re: [GENERAL] query with offset stops using index scan

2008-08-31 Thread Stanislav Raskin
which is not the case, because serial ids are not necessarily continuous (i.e. if some data sets were deleted). -Ursprüngliche Nachricht- Von: Scott Marlowe [mailto:[EMAIL PROTECTED] Gesendet: Sonntag, 31. August 2008 17:26 An: Stanislav Raskin Cc: pgsql-general@postgresql.org Betreff: R

Re: [GENERAL] query with offset stops using index scan

2008-08-31 Thread Scott Marlowe
On Sun, Aug 31, 2008 at 7:14 AM, Stanislav Raskin <[EMAIL PROTECTED]> wrote: > Hello everybody, > > 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