Re: [HACKERS] Show stopper ? (was: Re: "cruising" or "browsing" through tables using an index / ordering)

From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: Jan Vicherek <honza(at)ied(dot)com>
Cc: Dustin Sallings <dustin(at)spy(dot)net>, pgsql-questions(at)postgreSQL(dot)org, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Show stopper ? (was: Re: "cruising" or "browsing" through tables using an index / ordering)
Date: 1998-01-23 22:20:57
Message-ID: Pine.BSF.3.96.980123181056.28536b-100000@thelab.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 23 Jan 1998, Jan Vicherek wrote:

> Hi again,
>
> It seems unfortunate, but if I can't efficiently (i.e. no copying of
> whole table, no blocking and using index) browse the table, I might not
> be able to "sell" postgres into the commercial environment. :-( RAIMA
> Velocis might win :-(
>
> Please please help me solve this or make workarounds or anything. I
> would *really* like to see PosgreSQL to be playing against the Big
> (commercial) Boys !

I'm curious, but can the "Big (commercial) Boys" do this? If so,
can you please provide an example of which and how? Most of us here have
access to an one or the other (me, Oracle) to use as a sample system...if
we can prove that it does work on another system, then we have something
to work with, but right now all I've seen is "I wish I could do this", and
several examples on how to accomplish it using PostgreSQL, but that's
it...

>
> What the whole problem really reduces to, is to be able to get the next
> / previous value in an index. If I can do that, I win. No SELECT (and thus
> no locking) and no huge copying !). It seems to me like something
> primitive, so it should be easy. But it isn't obvious to me. Please help.

If there is no SELECT, how do you get data out of an SQL database?
*raised eyebrow*

> 0. having a value of a field on which there is an index, how can I do :
> a) current_pointer = some_function("value_I_have");
> b) next_pointer = some_other_function(current_pointer);
> c) one_tupple = yet_another_function(next_pointer);
> If I can accomplish a,b,c, then I win and I don't have to do questions
> 1..5 below.

Why not put a sequence field on the table so that you can do:

select * from table where rowid = n; -or-
select * from table where rowid = n - 1; -or-
select * from table where rowid = n + 1; -or-
select * from table where rowid >= n and rowid <= n+x;

And create the index on rowid?

Marc G. Fournier
Systems Administrator @ hub.org
primary: scrappy(at)hub(dot)org secondary: scrappy(at){freebsd|postgresql}.org

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Vicherek 1998-01-23 23:19:28 Re: [HACKERS] Show stopper ? (was: Re: "cruising" or "browsing" through tables using an index / ordering)
Previous Message Jan Vicherek 1998-01-23 21:50:29 Show stopper ? (was: Re: "cruising" or "browsing" through tables using an index / ordering)