Optimizing SELECT Statements In the following example, an outer join operation is used together with an inner join operation: That expression cannot be transformed into the following expression: For the given table states, the two expressions return different sets of rows: t1 LEFT JOIN (t2, t3) ON t1.a=t2.a t1 LEFT JOIN t2 ON t1.a=t2.a, t3 mysql>  SELECT * FROM t1 LEFT JOIN (t2, t3) ON t1.a=t2.a; +------+------+------+------+ | a | a | b | b | +------+------+------+------+ | 1 | 1 | 101 | 101 | | 2 | NULL | NULL | NULL | +------+------+------+------+ mysql>  SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.a, t3; +------+------+------+------+ | a | a | b | b | +------+------+------+------+ | 1 | 1 | 101 | 101 | | 2 | NULL | NULL | 101 | +------+------+------+------+ (t1,t2) LEFT JOIN t3 ON P(t2.b,t3.b) t1, t2 LEFT JOIN t3 ON P(t2.b,t3.b) SELECT * FROM t1 LEFT JOIN (t2 LEFT JOIN t3 ON t2.b=t3.b) ON t1.a=t2.a WHERE t1.a > 1 SELECT * FROM t1 LEFT JOIN (t2, t3) ON t1.a=t2.a WHERE (t2.b=t3.b OR t2.b IS NULL) AND t1.a > 1 t2 LEFT JOIN t3 ON t2.b=t3.b t2, t3 1663 In the first query, the parentheses can be omitted: The grammatical structure of the join expression dictates the same order of execution for join operations. For the second query, the parentheses cannot be omitted, In the first query, the nested join is formed with a left join operation. In the second query, it is formed with an inner join operation. Those queries are considered to contain these nested joins: Whenever the order of execution of join operations in a join expression ( joined_table ) is not from left to right, we talk about nested joins. Consider the following queries: Is equivalent to this expression for any tables  t1,t2,t3  and any condition  P  over attributes  t2.b  and t3.b : The following expression: More exactly, we cannot ignore parentheses in the right operand of the left outer join operation and in the left operand of a right join operation. In other words, we cannot ignore parentheses for the inner table expressions of outer join operations. Parentheses for the other operand (operand for the outer table) can be ignored. Therefore, if we omit parentheses in a join expression with outer join operators, we might change the result set for the original expression.