OSDN Git Service

Planner speedup hacking. Avoid saving useless pathkeys, so that path
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 14 Dec 2000 22:30:45 +0000 (22:30 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 14 Dec 2000 22:30:45 +0000 (22:30 +0000)
commitea166f11462c863d91378fcbb15d4d3140002413
treeef157dad5b07081aae231ab9691f2ef2d5b625a4
parentdb11f4382abad09d42e784c1fa19dfbcd68038ac
Planner speedup hacking.  Avoid saving useless pathkeys, so that path
comparison does not consider paths different when they differ only in
uninteresting aspects of sort order.  (We had a special case of this
consideration for indexscans already, but generalize it to apply to
ordered join paths too.)  Be stricter about what is a canonical pathkey
to allow faster pathkey comparison.  Cache canonical pathkeys and
dispersion stats for left and right sides of a RestrictInfo's clause,
to avoid repeated computation.  Total speedup will depend on number of
tables in a query, but I see about 4x speedup of planning phase for
a sample seven-table query.
16 files changed:
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/readfuncs.c
src/backend/optimizer/README
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/path/indxpath.c
src/backend/optimizer/path/joinpath.c
src/backend/optimizer/path/pathkeys.c
src/backend/optimizer/plan/initsplan.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/util/pathnode.c
src/include/nodes/relation.h
src/include/optimizer/pathnode.h
src/include/optimizer/paths.h
src/test/regress/expected/join.out