sql 查询优化:COUNT(*)改成COUNT(1)

This commit is contained in:
2025-11-06 18:10:29 +08:00
parent c54c470818
commit c7187ebd36
16 changed files with 48 additions and 48 deletions
@@ -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));