Re: best way to fetch next/prev record based on index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: best way to fetch next/prev record based on index
Date: 2004-07-27 15:33:19
Message-ID: 29487.1090942399@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com> writes:
> Plus, your where clause does not guarantee results.

No, but in combination with the ORDER BY it does. Please note also
that the offset would *always* be one, so your gripe about it not
scaling seems misguided to me.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2004-07-27 15:40:07 Re: best way to fetch next/prev record based on index
Previous Message Merlin Moncure 2004-07-27 15:29:53 Re: best way to fetch next/prev record based on index