网上都说not existes的效率比not in 要高,但是没有一个统一的解释。今天做了测试描述:"找到选修课程编号小于5的所有学生的id"not in 版本
select t1.s_id from sc t1 where t1.c_id not in (select t2.c_id from course t2 where t2.c_id > 5);not exists 版本 
select t1.s_id from sc t1 where not exists (select t2.c_id from sc t2 where t2.c_id > 5 and t2.c_id = t1.c_id);实际上,not exists的效率比not in慢了1000倍.我不知道是不是我的sql语句写的有问题?