From: Guillaume Cottenceau <gc@mnc.ch>
To: Christian Paul Cosinas <cpc@cybees.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Speed Up Offset and Limit Clause
Date: 11 May 2006 08:46:31 +0200
Message-ID: <87bqu5t5x4.fsf@meuh.mnc.lan> (raw)
In-Reply-To: <002801c67509$8f1a51a0$1e21100a@ghwk02002147>
References: <002801c67509$8f1a51a0$1e21100a@ghwk02002147>
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: gc@mnc.ch, cpc@cybees.com
Subject: Re: Speed Up Offset and Limit Clause
In-Reply-To: <87bqu5t5x4.fsf@meuh.mnc.lan>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox