Speed Up Offset and Limit Clause - Mailing list pgsql-performance

From Christian Paul Cosinas
Subject Speed Up Offset and Limit Clause
Date
Msg-id 002801c67509$8f1a51a0$1e21100a@ghwk02002147
Whole thread Raw
In response to Re: Same query - Slow in production  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Speed Up Offset and Limit Clause
Re: Speed Up Offset and Limit Clause
Re: Speed Up Offset and Limit Clause
List pgsql-performance
Hi!

How can I speed up my server's performance when I use offset and limit
clause.

For example I have a query:
SELECT * FROM table ORDER BY id, name OFFSET 100000 LIMIT 10000

This query takes a long time about more than 2 minutes.

If my query is:
SELECT * FROM table ORDER BY id, name OFFSET 50000 LIMIT 10000
It takes about 2 seconds.

Thanks


pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Same query - Slow in production
Next
From: Chris
Date:
Subject: Re: Speed Up Offset and Limit Clause