sql 查询优化:COUNT(*)改成COUNT(1)
This commit is contained in:
@@ -38,7 +38,7 @@ namespace FineUIPro.Web.HJGL.PurgingCleaning
|
||||
LEFT JOIN dbo.PTP_PipelineList AS IsoList ON IsoList.PipelineId = IsoInfo.PipelineId
|
||||
LEFT JOIN PTP_TestPackage As Test ON Test.PTP_ID =IsoList.PTP_ID
|
||||
WHERE IsoInfo.ProjectId= @ProjectId And Test.FinishDef is not null
|
||||
AND UnitWork.UnitWorkId= @UnitWorkId and (select count(*) from HJGL_PC_Pipeline p where p.PipelineId=IsoInfo.PipelineId)=0";
|
||||
AND UnitWork.UnitWorkId= @UnitWorkId and (select count(1) from HJGL_PC_Pipeline p where p.PipelineId=IsoInfo.PipelineId)=0";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", UnitWorkId));
|
||||
|
||||
Reference in New Issue
Block a user