A instance of SQL Server Express 2016 that I'm in charge of has suddenly started to use a lot more CPU that usual. It's the backend database for a website, but doesn't see all that many queries due to aggressive caching in the webapp.

Normal CPU usage would be 0-2%, but it's now averaging around 25% (on a VM with 4 logical cores).

Perfmon shows avg batches/s as 2, but compilations/s is a constant 300.

All access to the database is through stored procedures, which mostly involve a single SELECT statement.

How can I find out what it's continually compiling?

  • Did you check if the host is not capped out ?
    – Kin Shah
    Jul 30 '19 at 16:01
  • The VM itself is fine. Its a Amazon EC2 instance, which is also hosting the webapp, and that's running ok. 25% cpu usage is for the SQL instance itself, as reported in task manager, vs the 1-2% SQL normally uses.
    – user326247
    Jul 30 '19 at 16:27
  • Is Query Store enabled?
    – Joe Obbish
    Aug 1 '19 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.