Re: Poor OFFSET performance in PostgreSQL 9.1.6

From: Greg Spiegelberg <gspiegelberg(at)gmail(dot)com>
To: fburgess(at)radiantblue(dot)com
Cc: pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Poor OFFSET performance in PostgreSQL 9.1.6
Date: 2013-08-28 21:26:07
Message-ID: CAEtnbpVKxxJ7TUF9mG_Mn1F2PxmrRbWe_mkpaqzPZpqpfhNLOQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Two solutions come to mind. First possibility is table partitioning on the
column you're sorting. Second, depending on your application, is to use a
cursor. Cursor won't help with web applications however a stateful
application could benefit.

HTH
-Greg

On Wed, Aug 28, 2013 at 2:39 PM, <fburgess(at)radiantblue(dot)com> wrote:

> Can anyone offer suggestions on how I can optimize a query that contains
> the LIMIT OFFSET clause?
>
> The explain plan of the query is included in the notepad attachment.
>
> thanks
>
>
>
>
> --
> Sent via pgsql-performance mailing list (pgsql-performance(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-performance
>
>

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message fburgess 2013-08-28 22:08:16 Re: Poor OFFSET performance in PostgreSQL 9.1.6
Previous Message fburgess 2013-08-28 20:39:46 Poor OFFSET performance in PostgreSQL 9.1.6