mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
Rework join-removal logic as per recent discussion. In particular this
fixes things so that it works for cases where nested removals are possible. The overhead of the optimization should be significantly less, as well.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/optimizer/pathnode.h,v 1.83 2010/02/26 02:01:26 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/include/optimizer/pathnode.h,v 1.84 2010/03/28 22:59:33 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -51,8 +51,6 @@ extern ResultPath *create_result_path(List *quals);
|
||||
extern MaterialPath *create_material_path(RelOptInfo *rel, Path *subpath);
|
||||
extern UniquePath *create_unique_path(PlannerInfo *root, RelOptInfo *rel,
|
||||
Path *subpath, SpecialJoinInfo *sjinfo);
|
||||
extern NoOpPath *create_noop_path(PlannerInfo *root, RelOptInfo *rel,
|
||||
Path *subpath);
|
||||
extern Path *create_subqueryscan_path(RelOptInfo *rel, List *pathkeys);
|
||||
extern Path *create_functionscan_path(PlannerInfo *root, RelOptInfo *rel);
|
||||
extern Path *create_valuesscan_path(PlannerInfo *root, RelOptInfo *rel);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/optimizer/placeholder.h,v 1.4 2010/01/02 16:58:07 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/include/optimizer/placeholder.h,v 1.5 2010/03/28 22:59:33 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -22,6 +22,7 @@ extern PlaceHolderVar *make_placeholder_expr(PlannerInfo *root, Expr *expr,
|
||||
extern PlaceHolderInfo *find_placeholder_info(PlannerInfo *root,
|
||||
PlaceHolderVar *phv);
|
||||
extern void fix_placeholder_eval_levels(PlannerInfo *root);
|
||||
extern void add_placeholders_to_base_rels(PlannerInfo *root);
|
||||
extern void add_placeholders_to_joinrel(PlannerInfo *root,
|
||||
RelOptInfo *joinrel);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/optimizer/planmain.h,v 1.126 2010/02/26 02:01:26 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/include/optimizer/planmain.h,v 1.127 2010/03/28 22:59:33 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -108,6 +108,11 @@ extern RestrictInfo *build_implied_join_equality(Oid opno,
|
||||
Expr *item2,
|
||||
Relids qualscope);
|
||||
|
||||
/*
|
||||
* prototypes for plan/analyzejoins.c
|
||||
*/
|
||||
extern List *remove_useless_joins(PlannerInfo *root, List *joinlist);
|
||||
|
||||
/*
|
||||
* prototypes for plan/setrefs.c
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user