Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
blob: 9f76e65ce5181aefddac62cd244b56f0f37c7556 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*-------------------------------------------------------------------------
 *
 * paths.h--
 *    prototypes for various files in optimizer/paths (were separate
 *    header files
 *
 *
 * Copyright (c) 1994, Regents of the University of California
 *
 * $Id: paths.h,v 1.1 1996/08/28 07:23:19 scrappy Exp $
 *
 *-------------------------------------------------------------------------
 */
#ifndef	PATHS_H
#define	PATHS_H

/*
 * allpaths.h
 */
extern List *find_paths(Query *root, List *rels);

/*
 * indxpath.h
 *    routines to generate index paths
 */
extern List *find_index_paths(Query *root, Rel *rel, List *indices,
			      List *clauseinfo_list, 
			      List *joininfo_list);

/*
 * joinpath.h
 *     routines to create join paths
 */
extern void find_all_join_paths(Query *root, List *joinrels);
				

/*
 * orindxpath.h
 */
extern List *create_or_index_paths(Query *root, Rel *rel, List *clauses);

/*
 * hashutils.h
 *    routines to deal with hash keys and clauses
 */
extern List *group_clauses_by_hashop(List *clauseinfo_list,
				     int inner_relid);

/*
 * joinutils.h
 *    generic join method key/clause routines
 */
extern List *match_pathkeys_joinkeys(List *pathkeys,
		 List *joinkeys, List *joinclauses, int which_subkey,
		 List **matchedJoinClausesPtr);		     
extern List *extract_path_keys(List *joinkeys, List *tlist,
		 int which_subkey);
extern Path *match_paths_joinkeys(List *joinkeys, PathOrder *ordering,
		 List *paths, int which_subkey);
extern List *new_join_pathkeys(List *outer_pathkeys,
		 List *join_rel_tlist, List *joinclauses);

/*
 * mergeutils.h
 *    routines to deal with merge keys and clauses
 */
extern List *group_clauses_by_order(List *clauseinfo_list,
				    int inner_relid);
extern MInfo *match_order_mergeinfo(PathOrder *ordering,
				    List *mergeinfo_list);

/*
 * joinrels.h
 *    routines to determine which relations to join
 */
extern List *find_join_rels(Query *root, List *outer_rels);
extern void add_new_joininfos(Query *root, List *joinrels, List *outerrels);
extern List *final_join_rels(List *join_rel_list);

/*
 * prototypes for path/prune.c
 */
extern List *prune_joinrels(List *rel_list);
extern void prune_rel_paths(List *rel_list);
extern Path *prune_rel_path(Rel *rel, Path *unorderedpath);
extern List *merge_joinrels(List *rel_list1, List *rel_list2);
extern List *prune_oldrels(List *old_rels);

#endif	/* PATHS_H */