aboutsummaryrefslogtreecommitdiff
path: root/src/include/optimizer/pathnode.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-12-14 22:30:45 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-12-14 22:30:45 +0000
commitea166f11462c863d91378fcbb15d4d3140002413 (patch)
treeef157dad5b07081aae231ab9691f2ef2d5b625a4 /src/include/optimizer/pathnode.h
parentdb11f4382abad09d42e784c1fa19dfbcd68038ac (diff)
downloadpostgresql-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/include/optimizer/pathnode.h')
-rw-r--r--src/include/optimizer/pathnode.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/optimizer/pathnode.h b/src/include/optimizer/pathnode.h
index 993003eaa2f..11a6b184ebc 100644
--- a/src/include/optimizer/pathnode.h
+++ b/src/include/optimizer/pathnode.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pathnode.h,v 1.31 2000/11/12 00:37:01 tgl Exp $
+ * $Id: pathnode.h,v 1.32 2000/12/14 22:30:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -30,6 +30,7 @@ extern Path *create_seqscan_path(RelOptInfo *rel);
extern IndexPath *create_index_path(Query *root, RelOptInfo *rel,
IndexOptInfo *index,
List *restriction_clauses,
+ List *pathkeys,
ScanDirection indexscandir);
extern TidPath *create_tidscan_path(RelOptInfo *rel, List *tideval);
extern AppendPath *create_append_path(RelOptInfo *rel, List *subpaths);