select * from [ur_logs_dl]
where [coltdid] = 'XXXXX'
and not exists (select * from [ur_logs_done] where fid = [ur_logs_dl].id)
select * from [ur_logs_dl]
where [coltdid] = 'XXXXX'
and id not in (select fid from [ur_logs_done])
...全文
2795打赏收藏
查询语句优化问题
表 ur_logs_dl 和 ur_logs_done 的记录数都相当大,千万记录以上 请问下面那条语句查询效率更高? select * from [ur_logs_dl] where [coltdid] = 'XXXXX' and not exists (select * from [ur_logs_done] where fid = [ur_logs_dl].id) select * from [ur_logs_dl] where [coltdid] = 'XXXXX' and id not