mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
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.
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user