From: | Edmund Horner <ejrh00(at)gmail(dot)com> |
---|---|
To: | David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Tid scan improvements |
Date: | 2019-03-15 05:42:40 |
Message-ID: | CAMyN-kAWZHXXmB0KyZoj_Y7HSU+4H4hYNutuTqXiTveQFQueHA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, 14 Mar 2019 at 23:37, Edmund Horner <ejrh00(at)gmail(dot)com> wrote:
> On Thu, 14 Mar 2019 at 23:06, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> wrote:
> > Just looking again, I think the block of code starting:
> >
> > + if (density > 0.0)
> >
> > needs a comment to mention what it's doing. Perhaps:
> >
> > + /*
> > + * Using the average tuples per page, calculate how far into
> > + * the page the itemptr is likely to be and adjust block
> > + * accordingly.
> > + */
> > + if (density > 0.0)
> >
> > Or some better choice of words. With that done, I think 0001 is good to go.
>
> Ok, I'll look at it and hopefully get a new patch up soon.
Hullo,
Here's a new set of patches.
It includes new versions of the other patches, which needed to be
rebased because of the introduction of the "tableam" API by
c2fe139c20.
I've had to adapt it to use the table scan API. I've got it compiling
and passing tests, but I'm uneasy about some things that still use the
heapam API.
1. I call heap_setscanlimits as I'm not sure there is a tableam equivalent.
2. I'm not sure whether non-heap tableam implementations can also be
supported by my TID Range Scan: we need to be able to set the scan
limits. There may not be any other implementations yet, but when
there are, how do we stop the planner using a TID Range Scan for
non-heap relations?
3. When fetching tuples, I see that nodeSeqscan.c uses
table_scan_getnextslot, which saves dealing with HeapTuples. But
nodeTidrangescan wants to do some checking of the block and offset
before returning the slot. So I have it using heap_getnext and
ExecStoreBufferHeapTuple. Apart from being heapam-specific, it's just
not as clean as the new API calls.
Ideally, we can get to to support general tableam implementations
rather than using heapam-specific calls. Any advice on how to do
this?
Thanks
Edmund
Attachment | Content-Type | Size |
---|---|---|
v7-0001-Add-selectivity-estimate-for-CTID-system-variables.patch | application/octet-stream | 3.0 KB |
v7-0002-Support-backward-scans-over-restricted-ranges-in-hea.patch | application/octet-stream | 2.2 KB |
v7-0004-TID-selectivity-reduce-the-density-of-the-last-page-.patch | application/octet-stream | 1.9 KB |
v7-0003-Support-range-quals-in-Tid-Scan.patch | application/octet-stream | 57.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Kato, Sho | 2019-03-15 05:49:47 | RE: Fix typo in test code comments |
Previous Message | Imai, Yoshikazu | 2019-03-15 05:40:26 | RE: speeding up planning with partitions |