1996-07-09 08:22:35 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* paths.h
|
1999-07-27 08:23:12 +02:00
|
|
|
* prototypes for various files in optimizer/path (were separate
|
|
|
|
* header files)
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
|
|
|
*
|
|
|
|
* Copyright (c) 1994, Regents of the University of California
|
|
|
|
*
|
1999-08-16 04:17:58 +02:00
|
|
|
* $Id: paths.h,v 1.34 1999/08/16 02:17:45 tgl Exp $
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
1997-09-07 07:04:48 +02:00
|
|
|
#ifndef PATHS_H
|
|
|
|
#define PATHS_H
|
1996-07-09 08:22:35 +02:00
|
|
|
|
1997-11-26 02:14:33 +01:00
|
|
|
#include "nodes/relation.h"
|
|
|
|
|
1996-07-09 08:22:35 +02:00
|
|
|
/*
|
1999-07-27 08:23:12 +02:00
|
|
|
* allpaths.c
|
1996-07-09 08:22:35 +02:00
|
|
|
*/
|
1999-02-15 04:22:37 +01:00
|
|
|
extern RelOptInfo *make_one_rel(Query *root, List *rels);
|
1996-07-09 08:22:35 +02:00
|
|
|
|
|
|
|
/*
|
1999-07-27 08:23:12 +02:00
|
|
|
* indxpath.c
|
1997-09-07 07:04:48 +02:00
|
|
|
* routines to generate index paths
|
1996-07-09 08:22:35 +02:00
|
|
|
*/
|
1999-05-26 00:43:53 +02:00
|
|
|
extern List *create_index_paths(Query *root, RelOptInfo *rel, List *indices,
|
1999-05-25 18:15:34 +02:00
|
|
|
List *restrictinfo_list,
|
|
|
|
List *joininfo_list);
|
1999-07-27 05:51:11 +02:00
|
|
|
extern List *expand_indexqual_conditions(List *indexquals);
|
1996-07-09 08:22:35 +02:00
|
|
|
|
|
|
|
/*
|
1999-07-27 08:23:12 +02:00
|
|
|
* joinpath.c
|
1997-09-07 07:04:48 +02:00
|
|
|
* routines to create join paths
|
1996-07-09 08:22:35 +02:00
|
|
|
*/
|
1999-02-14 05:57:02 +01:00
|
|
|
extern void update_rels_pathlist_for_joins(Query *root, List *joinrels);
|
1997-09-07 07:04:48 +02:00
|
|
|
|
1996-07-09 08:22:35 +02:00
|
|
|
|
|
|
|
/*
|
1999-07-27 08:23:12 +02:00
|
|
|
* orindxpath.c
|
1996-07-09 08:22:35 +02:00
|
|
|
*/
|
1999-05-26 00:43:53 +02:00
|
|
|
extern List *create_or_index_paths(Query *root, RelOptInfo *rel, List *clauses);
|
1996-07-09 08:22:35 +02:00
|
|
|
|
|
|
|
/*
|
1999-08-16 04:17:58 +02:00
|
|
|
* pathkeys.c
|
|
|
|
* utilities for matching and building path keys
|
1996-07-09 08:22:35 +02:00
|
|
|
*/
|
1999-08-16 04:17:58 +02:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
PATHKEYS_EQUAL, /* pathkeys are identical */
|
|
|
|
PATHKEYS_BETTER1, /* pathkey 1 is a superset of pathkey 2 */
|
|
|
|
PATHKEYS_BETTER2, /* vice versa */
|
|
|
|
PATHKEYS_DIFFERENT /* neither pathkey includes the other */
|
|
|
|
} PathKeysComparison;
|
1996-07-09 08:22:35 +02:00
|
|
|
|
1999-08-16 04:17:58 +02:00
|
|
|
extern PathKeysComparison compare_pathkeys(List *keys1, List *keys2);
|
|
|
|
extern bool pathkeys_contained_in(List *keys1, List *keys2);
|
|
|
|
extern Path *get_cheapest_path_for_pathkeys(List *paths, List *pathkeys);
|
|
|
|
extern List *build_index_pathkeys(Query *root, RelOptInfo *rel,
|
|
|
|
RelOptInfo *index);
|
|
|
|
extern List *build_join_pathkeys(List *outer_pathkeys,
|
|
|
|
List *join_rel_tlist, List *joinclauses);
|
|
|
|
extern List *find_mergeclauses_for_pathkeys(List *pathkeys,
|
|
|
|
List *restrictinfos);
|
|
|
|
extern List *make_pathkeys_for_mergeclauses(List *mergeclauses,
|
|
|
|
List *tlist);
|
1996-07-09 08:22:35 +02:00
|
|
|
|
|
|
|
/*
|
1999-07-27 08:23:12 +02:00
|
|
|
* joinrels.c
|
1997-09-07 07:04:48 +02:00
|
|
|
* routines to determine which relations to join
|
1996-07-09 08:22:35 +02:00
|
|
|
*/
|
1999-02-18 05:45:36 +01:00
|
|
|
extern List *make_rels_by_joins(Query *root, List *old_rels);
|
1999-05-26 00:43:53 +02:00
|
|
|
extern List *make_rels_by_clause_joins(Query *root, RelOptInfo *old_rel,
|
1999-05-25 18:15:34 +02:00
|
|
|
List *joininfo_list, Relids only_relids);
|
1999-05-26 00:43:53 +02:00
|
|
|
extern List *make_rels_by_clauseless_joins(RelOptInfo *old_rel,
|
1999-05-25 18:15:34 +02:00
|
|
|
List *inner_rels);
|
1999-02-16 01:41:03 +01:00
|
|
|
extern RelOptInfo *get_cheapest_complete_rel(List *join_rel_list);
|
1999-07-27 08:23:12 +02:00
|
|
|
extern bool nonoverlap_sets(List *s1, List *s2);
|
|
|
|
extern bool is_subset(List *s1, List *s2);
|
1996-07-09 08:22:35 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* prototypes for path/prune.c
|
|
|
|
*/
|
1999-02-14 05:57:02 +01:00
|
|
|
extern void merge_rels_with_same_relids(List *rel_list);
|
1999-02-12 06:57:08 +01:00
|
|
|
extern void rels_set_cheapest(List *rel_list);
|
1999-02-16 01:41:03 +01:00
|
|
|
extern List *del_rels_all_bushy_inactive(List *old_rels);
|
1996-07-09 08:22:35 +02:00
|
|
|
|
1998-09-01 06:40:42 +02:00
|
|
|
#endif /* PATHS_H */
|