This article is a mirror article of machine translation, please click here to jump to the original article.

View: 12319|Reply: 2

[Source] SQL looks for statements that take up a lot of CPU

[Copy link]
Posted on 12/14/2018 2:26:04 PM | | |
SELECT TOP 50 SUM(qs.total_worker_time) AS total_cpu_time,SUM(qs.execution_count) AS total_execution_count,COUNT(*) AS number_of_statements,
(SELECT text FROM sys.dm_exec_sql_text(qs.sql_handle)) as sql_text
FROM sys.dm_exec_query_stats AS qs GROUP BY qs.sql_handle ORDER BY SUM(qs.total_worker_time) DESC





Previous:Look for DBLOCK
Next:switch method
Posted on 12/14/2018 3:55:57 PM |
It is recommended that the owner of the building should attach a screenshot of the execution when sending a sql statement, and I will give you extra points
 Landlord| Posted on 12/14/2018 4:40:48 PM |
I will pay attention next time, thank you for the reminder
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com