At http://dev.mysql.com/doc/refman/5.5/en/left-join-optimization.html one can read:
If you use LEFT JOIN to find rows that do not exist in some table and you have the following test: col_name IS NULL in the WHERE part, where col_name is a column that is declared as NOT NULL, MySQL stops searching for more rows (for a particular key combination) after it has found one row that matches the LEFT JOIN condition.
Can any body explain me what that mean in a human readable language? or in a newbie readable language ;)
Only rows that has no match on the right table will only be returned. This can be illustrated as:

As you can see, there are two tables being joined. The shaded part are the records which do not exists on Table B.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With