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: gsstark(at)mit(dot)edu, pgsql-performance(at)postgresql(dot)org
Subject: Re: best way to fetch next/prev record based on index
Date: 2004-07-29 18:41:37
Message-ID: 16242.1091126497@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
"Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)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

In response to

pgsql-performance by date

Next:From: Greg StarkDate: 2004-07-29 18:49:34
Subject: Re: best way to fetch next/prev record based on index
Previous:From: Merlin MoncureDate: 2004-07-29 18:23:15
Subject: Re: best way to fetch next/prev record based on index

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