left join运行了1分1秒,inner join运行了不到1秒
刚才用了20万行两个表关联查询,运行1000次,发现效果差距很大。
left join用了1分1秒;
inner join用了不到1秒;
From
fittings As Fit inner Join FitRunType As FRT On FRT.sID=FIT.sRunType
INNER join
( select * from FitStore
where sProperty1 like @sCode+'%' Or sProperty2 like @sCode+'%' Or sProperty3 like @sCode+'%'
) As ST On FIT.sID=ST.sItemID