NOT IN、JOIN、IS NULL、NOT EXISTS效率对比

来源:互联网 发布:windows系统正版验证 编辑:程序博客网 时间:2024/05/20 14:42

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)

详细出处参考:http://www.jb51.net/article/29122.htm

原创粉丝点击