Subqueries vs joins

前端 未结 14 2040
闹比i
闹比i 2020-11-22 16:10

I refactored a slow section of an application we inherited from another company to use an inner join instead of a subquery like:

WHERE id IN (SELECT id FROM          


        
14条回答
  •  礼貌的吻别
    2020-11-22 16:35

    Here's an example of how subqueries are evaluated in MySQL 6.0.

    The new optimizer will convert this kind of subqueries into joins.

提交回复
热议问题