Re: best way to fetch next/prev record based on index - Mailing list pgsql-performance

From Tom Lane
Subject Re: best way to fetch next/prev record based on index
Date
Msg-id 16242.1091126497@sss.pgh.pa.us
Whole thread Raw
In response to Re: best way to fetch next/prev record based on index  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
List pgsql-performance
"Merlin Moncure" <merlin.moncure@rcsonline.com> writes:
> I would much rather see postgres 'get' (a,b,c) > (a1,
> b1, c1)...if there is even a chance this is possible, I'll direct my
> efforts there.

For the ISAM context this whole discussion is kinda moot, because you
really don't want to have to plan and execute a fairly expensive query
for every record fetch.  If we had all the improvements discussed, it
would be a reasonably cheap operation by the standards of "execute
an independent query", but by the standards of "fetch next record
in my query" it'll still suck.  (Using PREPARE might help, but only
somewhat.)

It strikes me that what you really want for ISAM is to improve the
cursor mechanism so it will do the things you need.  I'm not sure
what's involved, but let's talk about that angle for a bit.

            regards, tom lane

pgsql-performance by date:

Previous
From: "Merlin Moncure"
Date:
Subject: Re: best way to fetch next/prev record based on index
Next
From: Greg Stark
Date:
Subject: Re: best way to fetch next/prev record based on index