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:40:07
Message-ID: 29558.1090942807@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> "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.

Oh, wait, you're right --- I'm mis-visualizing the situation.

Hmm, it sure seems like there ought to be an easy way to do this...

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2004-07-27 16:00:38 Re: best way to fetch next/prev record based on index
Previous Message Tom Lane 2004-07-27 15:33:19 Re: best way to fetch next/prev record based on index