From: Kevin Grittner <kgrittn@ymail.com>
To: adrianopatrick@gmail.com <adrianopatrick@gmail.com>
To: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #7918: limitation of pagination with LIMIT and OFFSET
Date: Wed, 6 Mar 2013 09:34:29 -0800 (PST)
Message-ID: <1362591269.94284.YahooMailNeo@web162903.mail.bf1.yahoo.com> (raw)
In-Reply-To: <E1UD4JI-0003gK-TF@wrigleys.postgresql.org>
References: <E1UD4JI-0003gK-TF@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
"adrianopatrick@gmail.com" <adrianopatrick@gmail.com> wrote:
> I need to process a query, the query returned as somewhere around
> 20 million records, I thought to do with LIMIT and OFFSET where
> the limit is fixed for 5000 records and will incrementing the
> OFFSET, but when reached OFFSET 400 000 consultation was very
> slow, taking almost the time of the query without LIMIT and
> OFFSET.
You should probably use a cursor instead of LIMIT and OFFSET.
--
Kevin Grittner
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: kgrittn@ymail.com, adrianopatrick@gmail.com
Subject: Re: BUG #7918: limitation of pagination with LIMIT and OFFSET
In-Reply-To: <1362591269.94284.YahooMailNeo@web162903.mail.bf1.yahoo.com>
References: <E1UD4JI-0003gK-TF@wrigleys.postgresql.org> <1362591269.94284.YahooMailNeo@web162903.mail.bf1.yahoo.com>
* 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