mirror of
https://github.com/postgres/postgres.git
synced 2025-10-28 11:55:03 +03:00
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 ...
30 lines
866 B
C
30 lines
866 B
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* joininfo.h
|
|
* prototypes for joininfo.c.
|
|
*
|
|
*
|
|
* 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.30 2005/06/09 04:19:00 tgl Exp $
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef JOININFO_H
|
|
#define JOININFO_H
|
|
|
|
#include "nodes/relation.h"
|
|
|
|
|
|
extern bool have_relevant_joinclause(RelOptInfo *rel1, RelOptInfo *rel2);
|
|
|
|
extern void add_join_clause_to_rels(PlannerInfo *root,
|
|
RestrictInfo *restrictinfo,
|
|
Relids join_relids);
|
|
extern void remove_join_clause_from_rels(PlannerInfo *root,
|
|
RestrictInfo *restrictinfo,
|
|
Relids join_relids);
|
|
|
|
#endif /* JOININFO_H */
|