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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-performance by date

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