I have a query which joins to a nested union and I'm getting a plan which never
returns. Here is the query simplified as much as possible:
select 'anything' as result
from "Attribute" as A1
inner join
(
Thanks for your reply Tom.
>> I have a query which joins to a nested union and I'm getting a plan which
>> never returns. Here is the query simplified as much as possible:
>> select 'anything' as result
>>from "Attribute" as A1
>> inner join
>>
>you are using EAV schema - it is against to relation model enough :)
>this schema has the most terrible performance for large datasets - looks on
>hstore instead
>Pavel
Actually despite the table named Attribute, I am not doing EAV though I can see
why you'd think that. Attributes are part of
>>Nate Allan writes:
>> It seems to me that the join condition (and hence the restriction) should be
>> pushed down into both sides of the union to bring the cardinality limit from
>> millions to 1. I'm imagining a rewrite like this:
>> R(a) J
>Right now, UNION DISTINCT, along with INTERSECT and EXCEPT, have basically no
>optimization support whatsoever...
> Sorry to be the bearer of bad news, but this isn't going to change just
> because you try to label it a bug.
Given the medium, I'll try not to read that in a snarky tone, after al