exists与in效率分析
--A表大,B表小,效率高 select * from A where ID in (select ID from B) --A表小,B表大,效率高 select * from A as TA where exists(select 1 from B as TB where TB.ID = TA.ID) --not in 全表扫描 --not exists 会用到索引
这篇(表扫描问题)
SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。另外一篇(索引问题)

更多精彩