17,089
社区成员
发帖
与我相关
我的任务
分享
select coun(1) from A left join B on a.id = b.id
查询结果执行10秒 select count(1) from B inner join A on B.id = A.id
select count(1) from A ,B where a.id = b.id
执行效果和第二条差距不大. select count(1) from uglsh.tb_installationdocuments a left join uglsh.tb_customer b on a.cid = b.id where 1 = 1 and
a.cid >= 0 and b.id >= 0
改成这样就只需要0.5秒,下面的截图是第一个sql语句的执行计划.