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

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

From: Rod Taylor <pg(at)rbt(dot)ca>
To: Merlin Moncure <merlin(dot)moncure(at)rcsonline(dot)com>
Cc: Postgresql Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: best way to fetch next/prev record based on index
Date: 2004-07-27 14:36:34
Message-ID: 1090938993.83536.85.camel@jester (view raw or flat)
Thread:
Lists: pgsql-performance
You only want one record to be returned? Tack a LIMIT 1 onto the end of 
the query.

> My problem is deceptively simple: how you read the next record from a
> table based on a given set of values?  In practice, this is difficult to
> implement.  If anybody can suggest a alternative/better way to this, I'm
> all ears.



In response to

pgsql-performance by date

Next:From: Markus SchaberDate: 2004-07-27 14:50:44
Subject: Re: best way to fetch next/prev record based on index
Previous:From: Merlin MoncureDate: 2004-07-27 14:21:32
Subject: Re: best way to fetch next/prev record based on index

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