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
@@ -36,7 +36,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
LEFT JOIN dbo.Base_TestMedium AS testMedium ON testMedium.TestMediumId = IsoInfo.TestMedium
LEFT JOIN dbo.Base_PipingClass class ON class.PipingClassId = IsoInfo.PipingClassId
WHERE IsoInfo.ProjectId= @ProjectId AND UnitWork.UnitWorkId= @UnitWorkId
and (select count(*) from PTP_PipelineList p where p.PipelineId=IsoInfo.PipelineId)=0";
and (select count(1) from PTP_PipelineList 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));