Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UD4ow-0007gw-3O for pgsql-bugs@arkaria.postgresql.org; Wed, 06 Mar 2013 03:15:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UD4ov-00049M-Hh for pgsql-bugs@arkaria.postgresql.org; Wed, 06 Mar 2013 03:15:09 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UD4JL-0001mR-Bp for pgsql-bugs@postgresql.org; Wed, 06 Mar 2013 02:42:31 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UD4JK-0002Ay-F3 for pgsql-bugs@postgresql.org; Wed, 06 Mar 2013 02:42:30 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UD4JJ-0002cu-4N for pgsql-bugs@postgresql.org; Wed, 06 Mar 2013 02:42:29 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1UD4JI-0003gK-TF for pgsql-bugs@postgresql.org; Wed, 06 Mar 2013 02:42:28 +0000 Date: Wed, 06 Mar 2013 02:42:28 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #7918: limitation of pagination with LIMIT and OFFSET To: pgsql-bugs@postgresql.org From: adrianopatrick@gmail.com X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 7918 Logged by: Adriano Patrick do Nascimento Cunha Email address: adrianopatrick@gmail.com PostgreSQL version: 8.4.7 Operating system: Windows/Linux Description:=20=20=20=20=20=20=20=20 Hello guys, today 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. I noticed that when the OFFSET is less than 400 000 the query execution plan is, but when this value exceeds the execution plan for the query changes and the query is too long. --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs