经常碰到类似这样的语句假设有5个表,每个表都是500万左右的记录表名是a,b,c,d,e语句如下select a.idfrom aleft join b on a.id=b.idleft join c on c.custno=d.custnoleft join d on d.name=e.name and e.startdate>='20171026'假设表上语句where字段上的索引都...
显示全部经常碰到类似这样的语句
假设有5个表,每个表都是500万左右的记录
表名是a,b,c,d,e
语句如下
select a.id
from a
left join b on a.id=b.id
left join c on c.custno=d.custno
left join d on d.name=e.name and e.startdate>='20171026'
假设表上语句where字段上的索引都有,统计信息也是最新的,
请问这样的语句如何优化?
收起