NOT IN、JOIN、IS NULL、NOT EXISTS效率对比
语句一:select count(*) from A where A.a not in (select a from B)
语句二:select count(*) from A left join B on A.a = B.a where B.a is null
语句三:select count(*) from A where not exists (select a from B where A.a = B.a)
NOT IN、JOIN、IS NULL、NOT EXISTS效率对比
语句一:select count(*) from A where A.a not in (select a from B)
语句二:select count(*) from A left join B on A.a = B.a where B.a is null
语句三:select count(*) from A where not exists (select a from B where A.a = B.a)