Subject Re: [firebird-support] Re: Strange performance on a VIEW
Author Ann W. Harrison
Adam wrote:
>
> Which ID field do you think it is selecting; T1.ID or T2.ID? Now
> which one is it actually selecting?

Errr, I think that is a problem with the simplification of the query and
has nothing to do with the problem. Firebird won't take the syntax offered.
>
>
> Also because it is obviously a join across PKs, left join and join
> will be identical, so using a normal inner join does not tie the
> optimisers hands to choosing a bad plan.

Errr, no. An outer join retains values from the specified table -
normally left - even if they don't match values from the other table
being joined. There's not reason to expect a full 1:1 match on the
primary keys of two tables.

And, as I said, the problem is that the semantic analysis in Firebird
1.5 doesn't handle complex views well, so there's an enormous
intermediate result set.


Regards,


Ann
>