I've just posted about filtering with joins is difficult to optimize (http://sqlblogcasts.com/blogs/simons/archive/2010/02/16/Filtering-by-joining-is-difficult-to-optimise.aspx). This post is along the same lines and is about the opposite, when joins don't filter as expected but rather they expand the result set.
As with the filtering post, this join situation I am going to describe is also difficult to identify and the database tuning advisor won't be able to help you either.
Someone asked me the other day if I had ever come across the situaiton of someone defining a join by using a cross join and then putting criteria in the where clause. I hadn't but it make sense if the person has come form the old way of writing queries where you specify all the tables in the from clause and then define the join criteria in the where clause.
tableA, tableB, tableC
No comments yet, be the first one to post comment.