This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Slow ARS Performance

One of our 4 ARS is very slow. The database team is seeing below query sent over and over to the database and causing the database server CPU to spike. Anyone know what it is? If we restart service, it stops for second and start again, and if they kill the query, it starts almost immediately again. And the date changes but way in 2015.

SELECT TOP 51 o.[guid]
    ,o.[data]
    ,o.[modified]
    ,o.[tracking]
FROM (
    SELECT m0.[operation]
    FROM (
        SELECT DISTINCT [guid] AS [operation]
        FROM [WfSharedOperations]
        WHERE [modified] >= '2015-03-12 09:11:12.370'
        ) AS m0
    INNER JOIN (
        SELECT DISTINCT [guid] AS [operation]
        FROM [WfSharedOperations]
        WHERE [modified] <= '2015-03-12 09:41:12.370'
        ) AS m1 ON m0.[operation] = m1.[operation]
    INNER JOIN (
        SELECT DISTINCT [operation]
        FROM [WfOperationValues]
        WHERE [property] = '7685382F-71A4-4E1A-8485-CDA6D46F1888'
            AND [value_short] = 'Completed'
        ) AS m2 ON m0.[operation] = m2.[operation]
    ) AS k
INNER JOIN [WfOperations] AS o ON k.[operation] = o.[guid]
WHERE 1 = 1
ORDER BY o.[modified] DESC
    ,o.[guid] ASC
OPTION (RECOMPILE)