In SQL (MSSQL, Oracle, etc., whatever), when joining tables, what is the gain from adding a filter to the JOIN statement instead of having it in the WHERE clause?
i.
As a human (rather than an optimizer) myself, when maintaining a query I would look for a join condition in the JOIN
clause and a search condition in the WHERE
clause.
Of course, you need to strike a balance between performance issues and code maintenance issues. However, my first priority is good logical code in the first instance then optimize as necessary.