Nab some low-hanging fruit: replace the planner's base_rel_list and
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 6 Jun 2005 04:13:36 +0000 (04:13 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 6 Jun 2005 04:13:36 +0000 (04:13 +0000)
commit2a76c4c44d8c784aa2fa0c86ec29d9f5c056514e
treeb75cce435292de565d060d3471a033d3844e103c
parent5edede9111b526544509a4051ec209d566a02dfc
Nab some low-hanging fruit: replace the planner's base_rel_list and
other_rel_list with a single array indexed by rangetable index.
This reduces find_base_rel from O(N) to O(1) without any real penalty.
While find_base_rel isn't one of the major bottlenecks in any profile
I've seen so far, it was starting to creep up on the radar screen
for complex queries --- so might as well fix it.
src/backend/nodes/outfuncs.c
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/plan/planmain.c
src/backend/optimizer/util/relnode.c
src/include/nodes/relation.h