Subject | Re: [firebird-support] Query optimization - Why this plan ? |
---|---|
Author | Ann W. Harrison |
Post date | 2005-03-15T19:11:20Z |
Alexandre Benson Smith wrote:
optimizer is confused. If you change all outer joins to inner joins, do
you get the same results? My hypothesis is that the query compiler is
being a bit too conservative about distribution equalities across all
join terms in input stream in the presence of am outer join.
Regards,
Ann
>Sorry it doesn't solve your problem, but it may be a clue as to why the
>>Alexander, out of curiosity, what happens if you put the e.name
>>restriction into the "on" clause of the first join?
>>
>> JOIN Cliente c
>> ON (e.EmpresaId = c.EmpresaId
>> and e.Nome = 'Alexandre Benson Smith')
>>
>
> The good plan !
>
optimizer is confused. If you change all outer joins to inner joins, do
you get the same results? My hypothesis is that the query compiler is
being a bit too conservative about distribution equalities across all
join terms in input stream in the presence of am outer join.
Regards,
Ann