Are all MySQL joins selections on the Cartesian product?
On reading the documentation of the MySQL join commands, it looks like all the joins
are analogous to ,
by simply finding the Cartesian product and then selecting from that result.
Logically you are correct, joins are Cartesian products that are filtered; but practically the DBMS query processor is smarter than that.
You would need to look at a show plan or explain to see what it is doing under the covers.
Assume that the Query Manager knows more than you do about how to create a fast and solid query plan, don't pre-optimize.
精彩评论