On 7 March 2013 18:47, Tom Lane wrote:
> Good idea, but no such luck in that form: it's still not going to try to
> push the parameterization down into the sub-query. I think you'd have
> to write out the query with the views expanded and manually put the
> WHERE restrictions into the lowest join
On 7 March 2013 05:52, Tom Lane wrote:
> Josh Berkus writes:
>> On 03/06/2013 06:54 AM, David Leverton wrote:
>>> I'm encountering very poor query plans when joining against a union,
>
>> Actually, in case #4, Postgres *is* pushing down the join qual into the
&g
Hi all,
I'm encountering very poor query plans when joining against a union,
where one branch of the union is itself a join: specifically, Postgres
does the entire inside join and then filters the result, rather than
pushing the filters down to the joined tables. I've provided a
standalone test c