开发者

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.

Is this an accurate assumption?

Should I instead write my own sub-queries and开发者_Go百科 select from those?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜