1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-27 00:12:01 +03:00

Improve planning of OR indexscan plans: for quals like

WHERE (a = 1 or a = 2) and b = 42
and an index on (a,b), include the clause b = 42 in the indexquals
generated for each arm of the OR clause.  Essentially this is an index-
driven conversion from CNF to DNF.  Implementation is a bit klugy, but
better than not exploiting the extra quals at all ...
This commit is contained in:
Tom Lane
2001-06-05 17:13:52 +00:00
parent 7c579fa12d
commit cdd230d628
4 changed files with 87 additions and 62 deletions

View File

@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: paths.h,v 1.53 2001/05/20 20:28:20 tgl Exp $
* $Id: paths.h,v 1.54 2001/06/05 17:13:51 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -47,8 +47,7 @@ extern List *expand_indexqual_conditions(List *indexquals);
* orindxpath.c
* additional routines for indexable OR clauses
*/
extern void create_or_index_paths(Query *root, RelOptInfo *rel,
List *clauses);
extern void create_or_index_paths(Query *root, RelOptInfo *rel);
/*
* tidpath.h