From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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 03:22:23 |
Message-ID: | 199910120322.XAA18860@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> > > Looks like a lot of work, and a lot of added code bulk that will
> > > have to be maintained. I haven't figured out why you think it's
> > > worth it... tids are so transient that I don't see much need for
> > > finding tuples by them...
> >
> > That's why I just suggested a more short-circuited option of snatching
> > tid oids from expressions, and doing a heap_fetch directly at that point
> > to avoid the index scan. Seems it could be done in just one file.
> >
>
> I have thought the way as Tom says and I have a prospect to do it.
> But it would take a lot of work.
>
> Where to snatch and return to(or exit from) planner/executor
> in your story ?
Basically, if I remember, in the executor, access to a table either
opens the table for sequential scan, does an index scan, or has the
value it needs already in a result of a previous join result.
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.
--
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
From | Date | Subject | |
---|---|---|---|
Next Message | The Hermit Hacker | 1999-10-12 04:02:49 | Re: [HACKERS] Re: [GENERAL] Update of bitmask type |
Previous Message | Sergio A. Kessler | 1999-10-12 03:12:25 | Re: Scripts (was Re: [HACKERS] Re: [INTERFACES] Next release is 7.0(?)) |