mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
Optmizer cleanup
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: cost.h,v 1.13 1999/02/10 03:52:53 momjian Exp $
|
||||
* $Id: cost.h,v 1.14 1999/02/10 21:02:43 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -43,8 +43,8 @@ extern Cost cost_mergejoin(Cost outercost, Cost innercost,
|
||||
extern Cost cost_hashjoin(Cost outercost, Cost innercost, List *outerkeys,
|
||||
List *innerkeys, int outersize, int innersize,
|
||||
int outerwidth, int innerwidth);
|
||||
extern int compute_rel_size(RelOptInfo * rel);
|
||||
extern int compute_rel_width(RelOptInfo * rel);
|
||||
extern int compute_rel_size(RelOptInfo *rel);
|
||||
extern int compute_rel_width(RelOptInfo *rel);
|
||||
extern int compute_joinrel_size(JoinPath *joinpath);
|
||||
extern int page_size(int tuples, int width);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: geqo.h,v 1.9 1998/09/01 04:36:56 momjian Exp $
|
||||
* $Id: geqo.h,v 1.10 1999/02/10 21:02:45 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -76,7 +76,7 @@ extern void geqo_params(int string_length);
|
||||
|
||||
extern Cost geqo_eval(Query *root, Gene *tour, int num_gene);
|
||||
double geqo_log(double x, double b);
|
||||
extern RelOptInfo *gimme_tree(Query *root, Gene *tour, int rel_count, int num_gene, RelOptInfo * outer_rel);
|
||||
extern RelOptInfo *gimme_tree(Query *root, Gene *tour, int rel_count, int num_gene, RelOptInfo *outer_rel);
|
||||
|
||||
|
||||
#endif /* GEQO_H */
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: geqo_misc.h,v 1.7 1998/09/01 04:36:59 momjian Exp $
|
||||
* $Id: geqo_misc.h,v 1.8 1999/02/10 21:02:47 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -31,7 +31,7 @@ extern void print_pool(FILE *fp, Pool *pool, int start, int stop);
|
||||
extern void print_gen(FILE *fp, Pool *pool, int generation);
|
||||
extern void print_edge_table(FILE *fp, Edge *edge_table, int num_gene);
|
||||
|
||||
extern void geqo_print_rel(Query *root, RelOptInfo * rel);
|
||||
extern void geqo_print_rel(Query *root, RelOptInfo *rel);
|
||||
extern void geqo_print_path(Query *root, Path *path, int indent);
|
||||
extern void geqo_print_joinclauses(Query *root, List *clauses);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: geqo_paths.h,v 1.6 1998/09/01 04:37:02 momjian Exp $
|
||||
* $Id: geqo_paths.h,v 1.7 1999/02/10 21:02:47 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -23,6 +23,6 @@
|
||||
|
||||
|
||||
extern List *geqo_prune_rels(List *rel_list);
|
||||
extern void geqo_rel_paths(RelOptInfo * rel);
|
||||
extern void geqo_rel_paths(RelOptInfo *rel);
|
||||
|
||||
#endif /* GEQO_PATHS_H */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: joininfo.h,v 1.8 1998/09/01 04:37:10 momjian Exp $
|
||||
* $Id: joininfo.h,v 1.9 1999/02/10 21:02:48 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "nodes/primnodes.h"
|
||||
|
||||
extern JoinInfo *joininfo_member(List *join_relids, List *joininfo_list);
|
||||
extern JoinInfo *find_joininfo_node(RelOptInfo * this_rel, List *join_relids);
|
||||
extern JoinInfo *find_joininfo_node(RelOptInfo *this_rel, List *join_relids);
|
||||
extern Var *other_join_clause_var(Var *var, Expr *clause);
|
||||
|
||||
#endif /* JOININFO_H */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: keys.h,v 1.8 1998/09/01 04:37:11 momjian Exp $
|
||||
* $Id: keys.h,v 1.9 1999/02/10 21:02:48 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -16,8 +16,8 @@
|
||||
#include "nodes/nodes.h"
|
||||
#include "nodes/relation.h"
|
||||
|
||||
extern bool match_indexkey_operand(int indexkey, Var *operand, RelOptInfo * rel);
|
||||
extern Var *extract_subkey(JoinKey *jk, int which_subkey);
|
||||
extern bool match_indexkey_operand(int indexkey, Var *operand, RelOptInfo *rel);
|
||||
extern Var *extract_join_subkey(JoinKey *jk, int which_subkey);
|
||||
extern bool samekeys(List *keys1, List *keys2);
|
||||
extern List *collect_index_pathkeys(int *index_keys, List *tlist);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: pathnode.h,v 1.11 1999/02/10 03:52:54 momjian Exp $
|
||||
* $Id: pathnode.h,v 1.12 1999/02/10 21:02:49 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -21,20 +21,20 @@
|
||||
* prototypes for pathnode.c
|
||||
*/
|
||||
extern bool path_is_cheaper(Path *path1, Path *path2);
|
||||
extern Path *set_cheapest(RelOptInfo * parent_rel, List *pathlist);
|
||||
extern List *add_pathlist(RelOptInfo * parent_rel, List *unique_paths,
|
||||
extern Path *set_cheapest(RelOptInfo *parent_rel, List *pathlist);
|
||||
extern List *add_pathlist(RelOptInfo *parent_rel, List *unique_paths,
|
||||
List *new_paths);
|
||||
extern Path *create_seqscan_path(RelOptInfo * rel);
|
||||
extern IndexPath *create_index_path(Query *root, RelOptInfo * rel, RelOptInfo * index,
|
||||
extern Path *create_seqscan_path(RelOptInfo *rel);
|
||||
extern IndexPath *create_index_path(Query *root, RelOptInfo *rel, RelOptInfo *index,
|
||||
List *restriction_clauses, bool is_join_scan);
|
||||
extern JoinPath *create_nestloop_path(RelOptInfo * joinrel, RelOptInfo * outer_rel,
|
||||
extern JoinPath *create_nestloop_path(RelOptInfo *joinrel, RelOptInfo *outer_rel,
|
||||
Path *outer_path, Path *inner_path, List *pathkeys);
|
||||
extern MergePath *create_mergejoin_path(RelOptInfo * joinrel, int outersize,
|
||||
extern MergePath *create_mergejoin_path(RelOptInfo *joinrel, int outersize,
|
||||
int innersize, int outerwidth, int innerwidth, Path *outer_path,
|
||||
Path *inner_path, List *pathkeys, MergeOrder *order,
|
||||
List *mergeclauses, List *outersortkeys, List *innersortkeys);
|
||||
|
||||
extern HashPath *create_hashjoin_path(RelOptInfo * joinrel, int outersize,
|
||||
extern HashPath *create_hashjoin_path(RelOptInfo *joinrel, int outersize,
|
||||
int innersize, int outerwidth, int innerwidth, Path *outer_path,
|
||||
Path *inner_path, List *pathkeys, Oid operator, List *hashclauses,
|
||||
List *outerkeys, List *innerkeys);
|
||||
@@ -49,6 +49,6 @@ extern RelOptInfo *get_join_rel(Query *root, List *relid);
|
||||
/*
|
||||
* prototypes for indexnode.h
|
||||
*/
|
||||
extern List *find_relation_indices(Query *root, RelOptInfo * rel);
|
||||
extern List *find_relation_indices(Query *root, RelOptInfo *rel);
|
||||
|
||||
#endif /* PATHNODE_H */
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: paths.h,v 1.12 1999/02/04 03:19:11 momjian Exp $
|
||||
* $Id: paths.h,v 1.13 1999/02/10 21:02:49 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -27,7 +27,7 @@ extern List *find_paths(Query *root, List *rels);
|
||||
* indxpath.h
|
||||
* routines to generate index paths
|
||||
*/
|
||||
extern List *find_index_paths(Query *root, RelOptInfo * rel, List *indices,
|
||||
extern List *find_index_paths(Query *root, RelOptInfo *rel, List *indices,
|
||||
List *restrictinfo_list,
|
||||
List *joininfo_list);
|
||||
|
||||
@@ -41,7 +41,7 @@ extern void find_all_join_paths(Query *root, List *joinrels);
|
||||
/*
|
||||
* orindxpath.h
|
||||
*/
|
||||
extern List *create_or_index_paths(Query *root, RelOptInfo * rel, List *clauses);
|
||||
extern List *create_or_index_paths(Query *root, RelOptInfo *rel, List *clauses);
|
||||
|
||||
/*
|
||||
* hashutils.h
|
||||
@@ -86,7 +86,7 @@ extern List *final_join_rels(List *join_rel_list);
|
||||
*/
|
||||
extern void prune_joinrels(List *rel_list);
|
||||
extern void prune_rel_paths(List *rel_list);
|
||||
extern Path *prune_rel_path(RelOptInfo * rel, Path *unorderedpath);
|
||||
extern Path *prune_rel_path(RelOptInfo *rel, Path *unorderedpath);
|
||||
extern List *merge_joinrels(List *rel_list1, List *rel_list2);
|
||||
extern List *prune_oldrels(List *old_rels);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: tlist.h,v 1.13 1998/09/01 04:37:21 momjian Exp $
|
||||
* $Id: tlist.h,v 1.14 1999/02/10 21:02:50 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
extern TargetEntry *tlistentry_member(Var *var, List *targetlist);
|
||||
extern Expr *matching_tlvar(Var *var, List *targetlist);
|
||||
extern void add_tl_element(RelOptInfo * rel, Var *var);
|
||||
extern void add_tl_element(RelOptInfo *rel, Var *var);
|
||||
extern TargetEntry *create_tl_element(Var *var, int resdomno);
|
||||
extern List *get_actual_tlist(List *tlist);
|
||||
extern Resdom *tlist_member(Var *var, List *tlist);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: xfunc.h,v 1.11 1999/02/03 20:15:53 momjian Exp $
|
||||
* $Id: xfunc.h,v 1.12 1999/02/10 21:02:50 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -49,7 +49,7 @@ extern int XfuncMode; /* defined in tcop/postgres.c */
|
||||
#define is_join(pathnode) (length(get_relids(get_parent(pathnode))) > 1 ? 1 : 0)
|
||||
|
||||
/* function prototypes from planner/path/xfunc.c */
|
||||
extern void xfunc_trypullup(RelOptInfo * rel);
|
||||
extern void xfunc_trypullup(RelOptInfo *rel);
|
||||
extern int xfunc_shouldpull(Path *childpath, JoinPath *parentpath,
|
||||
int whichchild, RestrictInfo * maxcinfopt);
|
||||
extern RestrictInfo *xfunc_pullup(Path *childpath, JoinPath *parentpath, RestrictInfo * cinfo,
|
||||
@@ -69,7 +69,7 @@ extern List *xfunc_primary_join(JoinPath *pathnode);
|
||||
extern Cost xfunc_get_path_cost(Path *pathnode);
|
||||
extern Cost xfunc_total_path_cost(JoinPath *pathnode);
|
||||
extern Cost xfunc_expense_per_tuple(JoinPath *joinnode, int whichchild);
|
||||
extern void xfunc_fixvars(Expr *clause, RelOptInfo * rel, int varno);
|
||||
extern void xfunc_fixvars(Expr *clause, RelOptInfo *rel, int varno);
|
||||
extern int xfunc_cinfo_compare(void *arg1, void *arg2);
|
||||
extern int xfunc_clause_compare(void *arg1, void *arg2);
|
||||
extern void xfunc_disjunct_sort(List *clause_list);
|
||||
@@ -78,7 +78,7 @@ extern int xfunc_func_width(RegProcedure funcid, List *args);
|
||||
extern int xfunc_tuple_width(Relation rd);
|
||||
extern int xfunc_num_join_clauses(JoinPath *path);
|
||||
extern List *xfunc_LispRemove(List *foo, List *bar);
|
||||
extern bool xfunc_copyrel(RelOptInfo * from, RelOptInfo ** to);
|
||||
extern bool xfunc_copyrel(RelOptInfo *from, RelOptInfo ** to);
|
||||
|
||||
/*
|
||||
* function prototypes for path/predmig.c
|
||||
|
||||
Reference in New Issue
Block a user