diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-12-14 22:30:45 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-12-14 22:30:45 +0000 |
commit | ea166f11462c863d91378fcbb15d4d3140002413 (patch) | |
tree | ef157dad5b07081aae231ab9691f2ef2d5b625a4 /src/backend/optimizer/path/allpaths.c | |
parent | db11f4382abad09d42e784c1fa19dfbcd68038ac (diff) | |
download | postgresql-ea166f11462c863d91378fcbb15d4d3140002413.tar.gz postgresql-ea166f11462c863d91378fcbb15d4d3140002413.zip |
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.
Diffstat (limited to 'src/backend/optimizer/path/allpaths.c')
-rw-r--r-- | src/backend/optimizer/path/allpaths.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index 12fc576612f..4f7a0e570f5 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.67 2000/11/12 00:36:58 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.68 2000/12/14 22:30:43 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -162,9 +162,7 @@ set_plain_rel_pathlist(Query *root, RelOptInfo *rel, RangeTblEntry *rte) create_tidscan_paths(root, rel); /* Consider index paths for both simple and OR index clauses */ - create_index_paths(root, rel, indices, - rel->baserestrictinfo, - rel->joininfo); + create_index_paths(root, rel, indices); /* * Note: create_or_index_paths depends on create_index_paths to |