diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-01-05 05:07:36 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-01-05 05:07:36 +0000 |
commit | 9091e8d1b233faf9994518fda7fcc171fddb53ac (patch) | |
tree | 572b200768bbfba3cfc121f1b4c12c79ab650d96 /src/backend/optimizer/util/pathnode.c | |
parent | bf488a6842ef2bf43ab89337c8970971e84951da (diff) | |
download | postgresql-9091e8d1b233faf9994518fda7fcc171fddb53ac.tar.gz postgresql-9091e8d1b233faf9994518fda7fcc171fddb53ac.zip |
Add the ability to extract OR indexscan conditions from OR-of-AND
join conditions in which each OR subclause includes a constraint on
the same relation. This implements the other useful side-effect of
conversion to CNF format, without its unpleasant side-effects. As
per pghackers discussion of a few weeks ago.
Diffstat (limited to 'src/backend/optimizer/util/pathnode.c')
-rw-r--r-- | src/backend/optimizer/util/pathnode.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index 55581774f2f..94109ee01e3 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/util/pathnode.c,v 1.96 2003/11/29 19:51:51 pgsql Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/util/pathnode.c,v 1.97 2004/01/05 05:07:35 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -373,13 +373,6 @@ create_index_path(Query *root, */ pathnode->rows = rel->rows; - /* - * Not sure if this is necessary, but it should help if the statistics - * are too far off - */ - if (index->indpred && index->tuples < pathnode->rows) - pathnode->rows = index->tuples; - cost_index(&pathnode->path, root, rel, index, indexquals, false); return pathnode; @@ -398,6 +391,7 @@ create_tidscan_path(Query *root, RelOptInfo *rel, List *tideval) pathnode->path.pathtype = T_TidScan; pathnode->path.parent = rel; pathnode->path.pathkeys = NIL; + pathnode->tideval = tideval; cost_tidscan(&pathnode->path, root, rel, tideval); |