From cdd230d62899455cc07ba1caf68387fb834d5bd2 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 5 Jun 2001 17:13:52 +0000 Subject: 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 ... --- src/backend/optimizer/path/allpaths.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/optimizer/path/allpaths.c') diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index bdc1c033296..fb55139a1e1 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.75 2001/06/05 05:26:04 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.76 2001/06/05 17:13:51 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -232,7 +232,7 @@ set_plain_rel_pathlist(Query *root, RelOptInfo *rel, RangeTblEntry *rte) create_index_paths(root, rel); /* create_index_paths must be done before create_or_index_paths */ - create_or_index_paths(root, rel, rel->baserestrictinfo); + create_or_index_paths(root, rel); /* Now find the cheapest of the paths for this rel */ set_cheapest(rel); -- cgit v1.2.3