I have a query with a few joins and a couple of basic SUM(...) statements, and no parameters.
It's been running without issue for months - but has suddenly started running very slowly on the server (4 core, 10GB RAM, disks on fast SAN)
If I run the query locally on my PC (2 core, 2GB RAM, one local disc) then it takes approx 1:20 to run.
Prior to this week, run on the server took approx 0:15 to run.
This week, run on server taking approx 12:30 to run!!!
This is a massive difference, and I have no idea what to start looking for to resolve the issue.
What I HAVE noticed is that this does not seem to be getting cached...OR something is hogging/not releasing cache.
Run this locally, 1:20...run it again immediately - almost instant.
Run on server 12:30...run it again immediately - 12:30 again?
Any suggestions very gratefully received!