Subqueries vs joins

前端 未结 14 2004
闹比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:47

    Look at the query plan for each query.

    Where in and Join can typically be implemented using the same execution plan, so typically there is zero speed-up from changing between them.

提交回复
热议问题