postgresql/src/include/nodes
David Rowley 475dbd0b71 Track a Bitmapset of non-pruned partitions in RelOptInfo
For partitioned tables with large numbers of partitions where queries are
able to prune all but a very small number of partitions, the time spent in
the planner looping over RelOptInfo.part_rels checking for non-NULL
RelOptInfos could become a large portion of the overall planning time.

Here we add a Bitmapset that records the non-pruned partitions.  This
allows us to more efficiently skip the pruned partitions by looping over
the Bitmapset.

This will cause a very slight slow down in cases where no or not many
partitions could be pruned, however, those cases are already slow to plan
anyway and the overhead of looping over the Bitmapset would be
unmeasurable when compared with the other tasks such as path creation for
a large number of partitions.

Reviewed-by: Amit Langote, Zhihong Yu
Discussion: https://postgr.es/m/CAApHDvqnPx6JnUuPwaf5ao38zczrAb9mxt9gj4U1EKFfd4AqLA@mail.gmail.com
2021-08-03 11:47:24 +12:00
..
bitmapset.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
execnodes.h Make nodeSort.c use Datum sorts for single column sorts 2021-07-22 14:03:19 +12:00
extensible.h Allow CustomScan providers to say whether they support projections. 2021-07-06 18:10:20 -04:00
lockoptions.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
makefuncs.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
memnodes.h Add function to log the memory contexts of specified backend process. 2021-04-06 13:44:15 +09:00
nodeFuncs.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
nodes.h Change the name of the Result Cache node to Memoize 2021-07-14 12:43:58 +12:00
params.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
parsenodes.h Add support for SET ACCESS METHOD in ALTER TABLE 2021-07-28 10:10:44 +09:00
pathnodes.h Track a Bitmapset of non-pruned partitions in RelOptInfo 2021-08-03 11:47:24 +12:00
pg_list.h Implement GROUP BY DISTINCT 2021-03-18 18:22:18 +01:00
plannodes.h Change the name of the Result Cache node to Memoize 2021-07-14 12:43:58 +12:00
primnodes.h Add missing enum tags in enums used in nodes 2021-07-21 11:03:25 +02:00
print.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
readfuncs.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
replnodes.h Remove two_phase variable from CreateReplicationSlotCmd struct. 2021-06-07 09:32:06 +05:30
subscripting.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
supportnodes.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
tidbitmap.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
value.h Update copyright for 2021 2021-01-02 13:06:25 -05:00