A customer is running SQL Server 2005 Standard edition on a server with Windows 2008, 16 cores (I think it's 4 quad-core CPU's), and 16 GB of RAM.
A lot of queries are running slowly. I've identified a handful that are timing out just after the 30-second mark.
The weird thing is that, when I run the same queries via SSMS, they run in 0 -7 seconds each ... depending on the query and circumstances.
But run by the application, they time out repeatedly ... one of them almost every time.
I've tried some additional query & index tuning, but a lot of that has been done before. I got marginal improvements for my efforts last week.
What, at a system or SQL configuration level, should I look at?
I've already checked:
The disk queue counters - they never went above 2 while I was watching them.
Processor Affinity -- all 16 are available to SQL Server
CPU load - I never see more than 2 CPU's spike, and then only a few seconds
RAM usage - only 6.5 GB of 16 are in use ... only 3.5 GB in use by SQL Server
What else should I be checking?
Thanks!
I would try setting ARITHABORT OFF in SSMS, then your performance should match more closely. I would suspect you are seeing an artifact of Query Plan variable sniffing.
Hope this helps.