|From:||Edmund Horner <ejrh00(at)gmail(dot)com>|
|To:||David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>|
|Cc:||PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>|
|Subject:||Re: Tid scan improvements|
|Views:||Raw Message | Whole Thread | Download mbox|
I have managed to split my changes into 4 patches:
(1) is basically independent, and usefully improves estimates for ctid quals.
(2) is the main patch, adding basic range scan support to TidPath and TidScan.
(3) is a small change to properly support backward scans over a
restricted range in heapam.c, and is needed for (4).
(4) adds Backward Tid Scans, and adds path keys to Tid Paths so that
the planner doesn't have to add a sort for certain queries.
I have tried to apply David's suggestions.
In (1), I've included the offset part of a CTID constant in the
selectivity calculation. I've not included "allvisfrac" in the
calculation; I'm not sure it's worth it as it would only affect the
I have tried to use iseq to differentiate between <=,>= versus <,>,
but I'm not sure I've got this right. I am also not entirely sure
it's worth it; the changes are already an improvement over the current
behaviour of using hardcoded selectivity constants.
In (2), the planner now picks up a greater variety of TID quals,
including AND-clauses with arbitrary children instead of the original
lower bound/upper bound pair. These are resolved in the executor into
a list of ranges to scan.
(3) is the same code, but I've added a couple of comments to explain the change.
(4) is basically the same pathkey/direction code as before (but as a
I hope the separation will make it easier to review. Item (2) is
still quite big, but a third of it is tests.
|Next Message||Peter Geoghegan||2018-11-04 04:26:21||Re: Making all nbtree entries unique by having heap TIDs participate in comparisons|
|Previous Message||Amit Kapila||2018-11-04 03:58:58||Re: WIP: Avoid creation of the free space map for small tables|