SQL Efficiency: WHERE IN Subquery vs. JOIN then GROUP

后端 未结 7 1805
予麋鹿
予麋鹿 2021-02-07 09:35

As an example, I want to get the list of all items with certain tags applied to them. I could do either of the following:

SELECT Item.ID, Item.Name
FROM Item
WH         


        
7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-07 10:02

    I think it would depend on how the optimizer handles them, it may even be the case that you end up with the same performance. Display execution plan is your friend here.

提交回复
热议问题