From: | Chris Mayfield <cmayfiel(at)cs(dot)purdue(dot)edu> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Merge Joins and Views |
Date: | 2008-03-29 12:36:56 |
Message-ID: | fsld55$1u6s$1@news.hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thank you for your prompt reply, I appreciate your insight on this.
> So the COALESCE has to be evaluated below the outer join, which means
> that the view can't be "flattened" into the upper query.
> ...
> So the long and the short of it is that the COALESCE acts as an
> optimization fence in the presence of outer joins. We've seen this
> before and there are some rough ideas about fixing it.
You may already have this rough idea somewhere, but it seems to me that
the view could be flattened into the upper query as long as the join
predicates don't depend on coalesced columns. In the examples I sent,
even if the COALESCE is evaluated at the very end of the query, the
merge join (on the id columns) would still be correct.
--Chris
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2008-03-29 13:41:08 | Re: Re: Survey: renaming/removing script binaries (createdb, createuser...) |
Previous Message | Gregory Stark | 2008-03-29 10:16:30 | Re: Merge Joins and Views |