mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
First cut at planner support for bitmap index scans. Lots to do yet,
but the code is basically working. Along the way, rewrite the entire approach to processing OR index conditions, and make it work in join cases for the first time ever. orindxpath.c is now basically obsolete, but I left it in for the time being to allow easy comparison testing against the old implementation.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/optimizer/cost.h,v 1.66 2005/04/21 19:18:13 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/optimizer/cost.h,v 1.67 2005/04/22 21:58:32 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -58,6 +58,7 @@ extern void cost_bitmap_heap_scan(Path *path, Query *root, RelOptInfo *baserel,
|
||||
Path *bitmapqual, bool is_injoin);
|
||||
extern void cost_bitmap_and_node(BitmapAndPath *path, Query *root);
|
||||
extern void cost_bitmap_or_node(BitmapOrPath *path, Query *root);
|
||||
extern void cost_bitmap_tree_node(Path *path, Cost *cost, Selectivity *selec);
|
||||
extern void cost_tidscan(Path *path, Query *root,
|
||||
RelOptInfo *baserel, List *tideval);
|
||||
extern void cost_subqueryscan(Path *path, RelOptInfo *baserel);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/optimizer/pathnode.h,v 1.59 2005/04/21 19:18:13 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/optimizer/pathnode.h,v 1.60 2005/04/22 21:58:32 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -30,12 +30,14 @@ extern void add_path(RelOptInfo *parent_rel, Path *new_path);
|
||||
extern Path *create_seqscan_path(Query *root, RelOptInfo *rel);
|
||||
extern IndexPath *create_index_path(Query *root,
|
||||
IndexOptInfo *index,
|
||||
List *restriction_clauses,
|
||||
List *clause_groups,
|
||||
List *pathkeys,
|
||||
ScanDirection indexscandir);
|
||||
ScanDirection indexscandir,
|
||||
bool isjoininner);
|
||||
extern BitmapHeapPath *create_bitmap_heap_path(Query *root,
|
||||
RelOptInfo *rel,
|
||||
Path *bitmapqual);
|
||||
Path *bitmapqual,
|
||||
bool isjoininner);
|
||||
extern BitmapAndPath *create_bitmap_and_path(Query *root,
|
||||
RelOptInfo *rel,
|
||||
List *bitmapquals);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/optimizer/paths.h,v 1.81 2005/04/11 23:06:56 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/optimizer/paths.h,v 1.82 2005/04/22 21:58:32 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -38,7 +38,9 @@ extern void debug_print_rel(Query *root, RelOptInfo *rel);
|
||||
extern void create_index_paths(Query *root, RelOptInfo *rel);
|
||||
extern Path *best_inner_indexscan(Query *root, RelOptInfo *rel,
|
||||
Relids outer_relids, JoinType jointype);
|
||||
extern List *group_clauses_by_indexkey(IndexOptInfo *index);
|
||||
extern List *group_clauses_by_indexkey(IndexOptInfo *index,
|
||||
List *clauses, List *outer_clauses,
|
||||
Relids outer_relids);
|
||||
extern List *group_clauses_by_indexkey_for_or(IndexOptInfo *index,
|
||||
Expr *orsubclause);
|
||||
extern bool match_index_to_operand(Node *operand, int indexcol,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/optimizer/restrictinfo.h,v 1.26 2004/12/31 22:03:36 pgsql Exp $
|
||||
* $PostgreSQL: pgsql/src/include/optimizer/restrictinfo.h,v 1.27 2005/04/22 21:58:32 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -27,10 +27,10 @@ extern void get_actual_join_clauses(List *restrictinfo_list,
|
||||
List **joinquals, List **otherquals);
|
||||
extern List *remove_redundant_join_clauses(Query *root,
|
||||
List *restrictinfo_list,
|
||||
JoinType jointype);
|
||||
bool isouterjoin);
|
||||
extern List *select_nonredundant_join_clauses(Query *root,
|
||||
List *restrictinfo_list,
|
||||
List *reference_list,
|
||||
JoinType jointype);
|
||||
bool isouterjoin);
|
||||
|
||||
#endif /* RESTRICTINFO_H */
|
||||
|
||||
Reference in New Issue
Block a user