From: | Dennis Haney <davh(at)diku(dot)dk> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | pull_up_subqueries question |
Date: | 2004-01-02 13:46:55 |
Message-ID: | 3FF5764F.4040207@diku.dk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi
I was looking at pull_up_subqueries
(backend/optimizer/prep/prepjointree.c 135) and I was wondering why the
recursive optimization is only done on subqueries that can be optimized.
As in, why isn't the code like:
if (rte->rtekind == RTE_SUBQUERY) {
subquery = copyObject(subquery);
if (subquery->hasSubLinks)
subquery->jointree->quals = pull_up_IN_clauses(subquery,
subquery->jointree->quals);
subquery->jointree = (FromExpr *)
pull_up_subqueries(subquery, (Node *) subquery->jointree,
false);
if (is_simple_subquery(subquery) &&
(!below_outer_join || has_nullable_targetlist(subquery)) &&
!contain_whole_tuple_var((Node *) parse, varno, 0))
{
//optimize the subquery up
}
}
--
Dennis
From | Date | Subject | |
---|---|---|---|
Next Message | ezra epstein | 2004-01-02 14:50:56 | 7.4 Alter User xxx VALID UNTIL '2000-01-01' does not work |
Previous Message | Chris Travers | 2004-01-02 13:44:16 | Re: Bug and/or feature? Complex data types in tables... |