mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
Simplify the planner's join clause management by storing join clauses
of a relation in a flat 'joininfo' list. The former arrangement grouped the join clauses according to the set of unjoined relids used in each; however, profiling on test cases involving lots of joins proves that that data structure is a net loss. It takes more time to group the join clauses together than is saved by avoiding duplicate tests later. It doesn't help any that there are usually not more than one or two clauses per group ...
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/optimizer/joininfo.h,v 1.29 2005/06/05 22:32:58 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/optimizer/joininfo.h,v 1.30 2005/06/09 04:19:00 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -17,8 +17,7 @@
|
||||
#include "nodes/relation.h"
|
||||
|
||||
|
||||
extern JoinInfo *find_joininfo_node(RelOptInfo *this_rel, Relids join_relids);
|
||||
extern JoinInfo *make_joininfo_node(RelOptInfo *this_rel, Relids join_relids);
|
||||
extern bool have_relevant_joinclause(RelOptInfo *rel1, RelOptInfo *rel2);
|
||||
|
||||
extern void add_join_clause_to_rels(PlannerInfo *root,
|
||||
RestrictInfo *restrictinfo,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/optimizer/restrictinfo.h,v 1.30 2005/06/05 22:32:58 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/optimizer/restrictinfo.h,v 1.31 2005/06/09 04:19:00 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -17,8 +17,10 @@
|
||||
#include "nodes/relation.h"
|
||||
|
||||
|
||||
extern RestrictInfo *make_restrictinfo(Expr *clause, bool is_pushed_down,
|
||||
bool valid_everywhere);
|
||||
extern RestrictInfo *make_restrictinfo(Expr *clause,
|
||||
bool is_pushed_down,
|
||||
bool valid_everywhere,
|
||||
Relids required_relids);
|
||||
extern List *make_restrictinfo_from_bitmapqual(Path *bitmapqual,
|
||||
bool is_pushed_down,
|
||||
bool valid_everywhere);
|
||||
|
||||
Reference in New Issue
Block a user