sql性能优化
有两个表AB,我需要查询A表里面id不在B表id里面的所有A数据怎么查才能比较好?表AB都是百万级的数据量
我是这样写的:select * from A where id not in (select id from B);
我是这样写的:select * from A where id not in (select id from B);
但是太耗时了,有没有什么更好的方法。