查找两个表中不存在的记段
比如 select * from a where a.sumdate not in (select distinct sumdate from b)
如果A表和B的数据量比较大,这样的查询语句效率是相当低下的
在这种情况下,尽量不要用not in,建议用left join或full join
比如:select * from a left join (select distinct sumdate from b) b on a.sumdate=b.sumdate where b.sumdate is null
这样执行起来效率就比较高