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

From Guillaume Cottenceau
Subject Re: Speed Up Offset and Limit Clause
Date
Msg-id 87bqu5t5x4.fsf@meuh.mnc.lan
Whole thread Raw
In response to Speed Up Offset and Limit Clause  ("Christian Paul Cosinas" <cpc@cybees.com>)
List pgsql-performance
"Christian Paul Cosinas" <cpc 'at' cybees.com> writes:

> 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.

First you should read the appropriate documentation.

http://www.postgresql.org/docs/8.1/interactive/performance-tips.html

--
Guillaume Cottenceau

pgsql-performance by date:

Previous
From: PFC
Date:
Subject: Re: Speed Up Offset and Limit Clause
Next
From: Martijn van Oosterhout
Date:
Subject: Re: [HACKERS] Big IN() clauses etc : feature proposal