From b0c4a50bbbbd62c444cb3806a97c1e51e2249cfd Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 6 Jan 2004 04:31:01 +0000 Subject: Instead of rechecking lossy index operators by putting them into the regular qpqual ('filter condition'), add special-purpose code to nodeIndexscan.c to recheck them. This ends being almost no net addition of code, because the removal of planner code balances out the extra executor code, but it is significantly more efficient when a lossy operator is involved in an OR indexscan. The old implementation had to recheck the entire indexqual in such cases. --- src/backend/optimizer/plan/setrefs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/backend/optimizer/plan/setrefs.c') diff --git a/src/backend/optimizer/plan/setrefs.c b/src/backend/optimizer/plan/setrefs.c index 8f64ef1488e..faf4eb29bee 100644 --- a/src/backend/optimizer/plan/setrefs.c +++ b/src/backend/optimizer/plan/setrefs.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/plan/setrefs.c,v 1.99 2003/11/29 19:51:50 pgsql Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/plan/setrefs.c,v 1.100 2004/01/06 04:31:01 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -362,8 +362,8 @@ set_join_references(Join *join, List *rtable) /* * We must fix the inner qpqual too, if it has join - * clauses (this could happen if the index is lossy: some - * indxquals may get rechecked as qpquals). + * clauses (this could happen if special operators are + * involved: some indxquals may get rechecked as qpquals). */ if (NumRelids((Node *) inner_plan->qual) > 1) inner_plan->qual = join_references(inner_plan->qual, -- cgit v1.2.3