Impact : Medium
Slow SQL responses will degrade the user experience, resulting in poor efficiency of your organization’s operations.
Expected behavior :
There are no suggested metrics for CPU utilization. The figures will vary based on levels of user activity, time of day etc. Business Intelligence (BI) applications will typically load the CPU by 20-30 per cent above other applications. In addition, load from non-SQL activities can significantly increase overall utilization level.
Processes started to load CPU due to long tasks performed outside SQL, such as anti-virus scans.
Identify the source of the load (using built-in OS tools such as PerfMon) and if it is recurrent, try to reschedule to a time of low user demand.
SQL Processes started to load CPU due to long tasks performed such as :
– accessing data where indexes are missing or corrupt (causes long loops)
– pulling large volumes of data (results in many threads or long loops)
– coding problems (inefficient organization, missing indexes causing many threads or long loops)
Identify the source of the load and if it is recurrent, try to reschedule to a time of low user demand.
Incorrect query code may result in inefficient data access.
Look for functions over fields that can be tuned or avoided in order to improve performance. Minimize the number of repeats (reading records more than once) as much as possible. Minimize the number of fields and records in the result sets as much as possible so that they would only return what is needed and nothing more. Break complex queries to more simple steps. Look for often used “Cluster Lookup” and “Hush Merger” and minimize their frequency by optimizing the code. Make sure that each transaction has COMMIT (in case of no errors) and ROLLBACK (in any case of an error) statements where applicable.
Detect missing indexes by looking at the execution plans.
CPU utilization measures the load of all the tasks that are being performed by the server. This depends largely on the type of operation, for example Business Intelligence applications typically take over 80% of CPU capacity, compared SQL database application, where CPU usage below 70% is considered normal. CPU usage above this number means degradation in user response times.