Re: Scan by TID (was RE: [HACKERS] How to add a new build-in operator)

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, pgsql-hackers <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Scan by TID (was RE: [HACKERS] How to add a new build-in operator)
Date: 1999-10-12 15:10:21
Message-ID: 199910121510.LAA20419@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> writes:
> > If we put something in the executor so when a sequential/index scan is
> > requested on a table that has a restriction on tid, you could just do a
> > heap_fetch and return the single row, rather than putting the query
> > through the whole scan process for every row checking to see if it
> > matches the WHERE restriction.
>
> > Seems like a few lines in the executor could do the entire job of
> > fetching by tid by short-circuiting the sequential/index scan.
>
> If I understand what you're proposing here, it would be a horrible
> mangling of the system structure and doubtless a fruitful source
> of bugs. I don't think we should be taking shortcuts with this issue.
> If we think fast access by TID is worth supporting at all, we should
> expend the work to do it properly.

But to do that whole thing properly, you are adding tons of complexity
in access methods and stuff just to support one type that by definition
is very internal to the backend.

Just my ideas. I understand you concern. I just thought a few
well-placed lines could do the trick without adding tons of other stuff.

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-10-12 15:24:22 Re: [HACKERS] Features for next release
Previous Message Bruce Momjian 1999-10-12 15:08:43 Re: [HACKERS] Dead CVS directories