请分析这段代码的效率。。
select b.CustomNm,a.CIFNm,a.CreditNm,c.Pk_Id,a.ActionNo,
(select SalesNm from ExcelApp.dbo.SalesInf where
SalesCode=d.InputOperCode or SalesCode=e.ExamineOperCode or SalesCode=f.OperCode) opcd,ISNULL(e.ExamineResume,f.DecideCase) dResume from OperateList a
join ExcelApp.dbo.CIFInf b on a.CIFNm=b.CIFNm and SetpNo in
(select aa.Setpno from
(select MAX(a.SetpNo) Setpno,CreditNm from OperateList a where a.CIFNm=@cifno group by CreditNm) aa)
and a.CIFNm=@cifno and (a.ActionNo!=0 or a.ActionNo=2 or a.ActionNo=4) and a.ActionNo!=1 and a.ActionNo <6
join CustomMainInf c on c.CreditNm=a.CreditNm
left join HistoryInput d on d.SetpNo=a.SetpNo and d.CreditNm=a.CreditNm
left join HistoryExamine e on e.SetpNo=a.SetpNo and e.CreditNm=a.CreditNm
left join HistoryApprove f on f.SetpNo=a.SetpNo and f.CreditNm=a.CreditNm
红色部分的是四个表,按照目前来说,是可以合并的。
请问,合并为一张表后,数据是否更快。
------解决方案--------------------这个具体要看你实际的查询计划,不过个人觉得合并成一个表应该会减少一些数据提取及比对的时间