summaryrefslogtreecommitdiff
path: root/src/include/optimizer/placeholder.h
diff options
context:
space:
mode:
authorTom Lane2022-08-17 19:35:51 +0000
committerTom Lane2022-08-17 19:35:51 +0000
commit6569ca43973b754e8213072c8ddcae9e7baf2aaa (patch)
tree396627f9ae41b4bd5f069cd20c142d30d62b8b59 /src/include/optimizer/placeholder.h
parentefd0c16becbf45e3b0215e124fde75fee8fcbce4 (diff)
Make PlaceHolderInfo lookup O(1).
Up to now we've just searched the placeholder_list when we want to find the PlaceHolderInfo with a given ID. While there's no evidence of that being a problem in the field, an upcoming patch will add find_placeholder_info() calls in build_joinrel_tlist(), which seems likely to make it more of an issue: a joinrel emitting lots of PlaceHolderVars would incur O(N^2) cost, and we might be building a lot of joinrels in complex queries. Hence, add an array that can be indexed directly by phid to make the lookups constant-time. Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/include/optimizer/placeholder.h')
0 files changed, 0 insertions, 0 deletions