Re: Speed Up Offset and Limit Clause

Поиск
Список
Период
Сортировка
От Chris
Тема Re: Speed Up Offset and Limit Clause
Дата
Msg-id 4462DEF8.7060805@gmail.com
обсуждение исходный текст
Ответ на Speed Up Offset and Limit Clause  ("Christian Paul Cosinas" <cpc@cybees.com>)
Список pgsql-performance
Christian Paul Cosinas wrote:
> 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.

Please create a new thread rather than replying to someone elses post
and changing the subject. These threads can sometimes get missed.

You do have an index on id and name don't you?

--
Postgresql & php tutorials
http://www.designmagick.com/

В списке pgsql-performance по дате отправления:

Предыдущее
От: "Christian Paul Cosinas"
Дата:
Сообщение: Speed Up Offset and Limit Clause
Следующее
От: PFC
Дата:
Сообщение: Re: Speed Up Offset and Limit Clause