Speed Up Offset and Limit Clause

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux