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

From Tom Lane
Subject Re: Scan by TID (was RE: [HACKERS] How to add a new build-in operator)
Date
Msg-id 16598.939740529@sss.pgh.pa.us
Whole thread Raw
In response to Re: Scan by TID (was RE: [HACKERS] How to add a new build-in operator)  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: Scan by TID (was RE: [HACKERS] How to add a new build-in operator)
List pgsql-hackers
Bruce Momjian <maillist@candle.pha.pa.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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Mount
Date:
Subject: RE: [HACKERS] Dead CVS directories
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Dead CVS directories