Speed Up Offset and Limit Clause

Поиск
Список
Период
Сортировка
От Christian Paul Cosinas
Тема Speed Up Offset and Limit Clause
Дата
Msg-id 002801c67509$8f1a51a0$1e21100a@ghwk02002147
обсуждение исходный текст
Ответ на Re: Same query - Slow in production  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Speed Up Offset and Limit Clause  (Chris <dmagick@gmail.com>)
Re: Speed Up Offset and Limit Clause  (PFC <lists@peufeu.com>)
Re: Speed Up Offset and Limit Clause  (Guillaume Cottenceau <gc@mnc.ch>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Same query - Slow in production
Следующее
От: Chris
Дата:
Сообщение: Re: Speed Up Offset and Limit Clause