|
SELECT * FROM (SELECT TOP 100 PERCENT ROW_NUMBER() OVER( ORDER BY SA_Task.SCREATETIME DESC) AS JUSTEP_RN__, SA_Task.sID AS SA_Task, SA_Task.SACTIVITY AS sActivity,
SA_Task.SCREATETIME AS sCreateTime, SA_Task.SCREATORFNAME AS sCreatorFName, SA_Task.SDATA1 AS sData1,
SA_Task.SDATA2 AS sData2, SA_Task.SDATA3 AS sData3, SA_Task.SDATA4 AS sData4, SA_Task.SEURL AS sEURL,
SA_Task.SEXECUTORFID AS sExecutorFID, SA_Task.SEXECUTORFNAME AS sExecutorFName, SA_Task.SEXECUTORNAMES AS sExecutorNames,
SA_Task.SKINDID AS sKindID, SA_Task.SNAME AS sName, SA_Task.SPROCESS AS sProcess, SA_Task.SSTATUSID AS sStatusID FROM SA_Task SA_Task
WHERE ( (SA_Task.SSTATUSID = @P0 ) OR (SA_Task.SSTATUSID = @P1 ) ) AND ( @P2 LIKE SA_Task.SEXECUTORFID + @P3 ) AND (SA_Task.SEXECUTORFID LIKE @P4 )
ORDER BY SA_Task.SCREATETIME DESC) AS JUSTEP_TABLE__ WHERE JUSTEP_RN__ >= 1 AND JUSTEP_RN__<6
以上sql在生产环境频繁操作数据库导致数据库死锁。请问怎么解决?
|
|