Subject Re: Optimizer selects non-optimal plan
Author jstahl80
--- In firebird-support@yahoogroups.com, Vlad Horsun <hvlad@...> wrote:
...
> "a inner join b left join c" is NOT equal to "b left join c inner
join a"

I'm no expert in relational theory, so why?

First case: take all rows where a.id=b.id even if no rows of c match
condition b.id=c.id

Second case: take all rows of b even if no rows of c match condition
b.id=c.id, restrict this set to the rows matching a.id=b.id.

The result is the same. Or where I am wrong? Isn't x inner join y == y
inner join x?

Thanks for a little training in joining tables...,
Joja