MySQL Forums
Forum List  »  InnoDB

Re: LEFT OUTER JOIN on NULL value
Posted by: Rick James
Date: May 13, 2014 08:40AM

I would _guess_ that the LEFT JOIN is better. But, let's find out.

Let's see the output from
EXPLAIN SELECT ... LEFT JOIN ...;
EXPLAIN SELECT ... ISNULL ...;
If you have a recent enough version of MySQL, do EXPLAIN FORMAT=JSON SELECT ...; also.

Also, for each SELECT:
SHOW STATUS LIKE "Handler%";
SELECT ...
SHOW STATUS LIKE "Handler%";

If the EXPLAINs look identical, and the changes in the Handler STATUS values are identical, then probably the performance is identical. If there are differences, these bits of info could give clues as to what the optimizer is doing and which will scale better, etc.

Options: ReplyQuote


Subject
Views
Written By
Posted
3278
May 12, 2014 08:23AM
Re: LEFT OUTER JOIN on NULL value
992
May 13, 2014 08:40AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.