diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-04-15 20:09:28 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-04-15 20:09:28 +0000 |
commit | fa92d21a486de868b21bbc03944649af3e1ac90f (patch) | |
tree | 599daee8e00be38b5dbddf2b27a5dbe72bd79ef5 /src/include/optimizer/paths.h | |
parent | f97d4a267a8d8b680960dfc32bd7111eb7ed8dca (diff) | |
download | postgresql-fa92d21a486de868b21bbc03944649af3e1ac90f.tar.gz postgresql-fa92d21a486de868b21bbc03944649af3e1ac90f.zip |
Avoid running build_index_pathkeys() in situations where there cannot
possibly be any useful pathkeys --- to wit, queries with neither any
join clauses nor any ORDER BY request. It's nearly free to check for
this case and it saves a useful fraction of the planning time for simple
queries.
Diffstat (limited to 'src/include/optimizer/paths.h')
-rw-r--r-- | src/include/optimizer/paths.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/optimizer/paths.h b/src/include/optimizer/paths.h index 6b985e24cd7..c7b8d8c7521 100644 --- a/src/include/optimizer/paths.h +++ b/src/include/optimizer/paths.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/optimizer/paths.h,v 1.96 2007/02/16 00:14:01 tgl Exp $ + * $PostgreSQL: pgsql/src/include/optimizer/paths.h,v 1.97 2007/04/15 20:09:28 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -176,5 +176,6 @@ extern int pathkeys_useful_for_ordering(PlannerInfo *root, List *pathkeys); extern List *truncate_useless_pathkeys(PlannerInfo *root, RelOptInfo *rel, List *pathkeys); +extern bool has_useful_pathkeys(PlannerInfo *root, RelOptInfo *rel); #endif /* PATHS_H */ |