git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: efd0c16) | patch
Make PlaceHolderInfo lookup O(1).
2022年8月17日 19:35:51 +0000 (15:35 -0400)
2022年8月17日 19:35:51 +0000 (15:35 -0400)
commit 6569ca43973b754e8213072c8ddcae9e7baf2aaa
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/1405792.1660677844@sss.pgh.pa.us
src/backend/optimizer/plan/analyzejoins.c diff | blob | blame | history
src/backend/optimizer/plan/planmain.c diff | blob | blame | history
src/backend/optimizer/util/placeholder.c diff | blob | blame | history
src/backend/optimizer/util/var.c diff | blob | blame | history
src/include/nodes/pathnodes.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /