Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-performance by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group