Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 143529

high CPU usage SQL DB

$
0
0

Hi All,

now I am facing high cpu usage on my sql DB server, after simple check using this link https://blog.sqlauthority.com/2009/01/07/sql-server-find-currently-running-query-t-sql/ 

there has one query that executed many times and make the cpu high..

here is the query :

WITH "account0Security" as (
select xxx

case when poaa0.ReadAccess is null then 0 else poaa0.ReadAccess end as 'poaa0_openrevenue', 
case when poaa1.ReadAccess is null then 0 else poaa1.ReadAccess end as 'poaa1_opendeals' 
from
account0Security as "account0"
left outer join fn_UserSharedAttributeAccess(@flsSecuredSystemUserId0, @securedAttributeId0, @securedAttributeObjectTypeCode0) as "poaa0" 
on (poaa0.ObjectId = "account0".AccountId)

left outer join fn_UserSharedAttributeAccess(@flsSecuredSystemUserId1, @securedAttributeId1, @securedAttributeObjectTypeCode1) as "poaa1" 
on (poaa1.ObjectId = "account0".AccountId)

where
(("account0".Name like @Name0)) order by
"account0".AccountId asc


please any suggestion what is that query purpose? and how to solve this issue?

thanks


Viewing all articles
Browse latest Browse all 143529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>