Recursive optimization of IN subqueries - Mailing list pgsql-general

From Dennis Haney
Subject Recursive optimization of IN subqueries
Date
Msg-id 400D483A.1080603@diku.dk
Whole thread Raw
Responses Re: Recursive optimization of IN subqueries
List pgsql-general
Hi

As far as I can tell, the pull_up_IN_clauses does not optimize
recursively. Am I totally misguided here?

Index: plan/subselect.c
===================================================================
RCS file:
/projects/cvsroot/pgsql-server/src/backend/optimizer/plan/subselect.c,v
retrieving revision 1.85
diff -u -r1.85 subselect.c
--- plan/subselect.c    25 Nov 2003 23:59:12 -0000      1.85
+++ plan/subselect.c    20 Jan 2004 15:21:55 -0000
@@ -716,6 +716,14 @@
        if (contain_volatile_functions((Node *) sublink->lefthand))
                return NULL;

+    /*
+     * Optimize recursive
+     */
+       subselect->in_info_list = NIL;
+       if (subselect->hasSubLinks)
+         subselect->jointree->quals = pull_up_IN_clauses(subselect,
+
subselect->jointree->quals);
+
        /*
         * Okay, pull up the sub-select into top range table and jointree.
         *

--
Dennis



pgsql-general by date:

Previous
From:
Date:
Subject: Transaction id
Next
From: Tom Lane
Date:
Subject: Re: Recursive optimization of IN subqueries