Subject Re: [ib-support] search conditions in OUTER JOIN vs WHERE
Author Arno Brinkman
Hi,

> > * Is this behaviour documented anywhere?
> > * Does the SQL standards say anything on this subject?
>
> I shall bow to the wisdom of others on these two questions (or go and
> research it, if necessary).

As far as i know the SQL standard says that the WHERE clause is related
to the results of items specified in FROM.
The conditions in the ON are directly related to the reference (most table)
where it's added.

> > * Is this a feature or a bug?
>
> That rather depends. It is probably a bug, but top marks to the
> optimizer for initiative! It would certainly speed up a query if the
> employee table was large and the job table was small.

I don't think it's a bug. It's as described in SQL-standard documentation.
And if you think about it. It's very logical ;-)

Regards,
Arno Brinkman
ABVisie

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird links :
http://www.firebirdsql.com
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/