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/nodes/copyfuncs.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/backend/nodes/copyfuncs.c') diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index 75c2fa898d9..18a8a369e69 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -15,7 +15,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.273 2004/01/05 05:07:35 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.274 2004/01/06 04:31:01 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -284,6 +284,17 @@ _copyIndexScan(IndexScan *from) } newnode->indxsubtype = newsubtype; } + /* this can become COPY_NODE_FIELD when intlists are normal objects: */ + { + List *newstrat = NIL; + List *tmp; + + foreach(tmp, from->indxlossy) + { + newstrat = lappend(newstrat, listCopy(lfirst(tmp))); + } + newnode->indxlossy = newstrat; + } COPY_SCALAR_FIELD(indxorderdir); return newnode; -- cgit v1.2.3