简体   繁体   English

Azure SQL DTU很高

[英]Azure SQL DTU very high

An Azure SQL instance is running at DTU of 399% approx. Azure SQL实例以大约399%的DTU运行。 This is slowing my whol application down. 这使我的Whol应用程序变慢了。

A worker role started a number of Stored Procedures last night and seems to have sent the processing through the roof. 一个工作者角色昨晚启动了许多存储过程,并且似乎已通过屋顶发送了该过程。

Is there any way to tell exactly what processes/procedures are causing the high DTU? 有什么方法可以准确说明导致DTU高的哪些过程/程序? Is there any way to end those processes/procedures? 有什么方法可以结束这些流程/程序吗?

I am new to Azure so appreciate any pointers that may help me to determine the exact cause and cure for my crazy DTU %. 我是Azure的新手,因此感谢可以帮助我确定确切原因并治愈疯狂DTU%的任何提示。

You can use the view sys.dm_exec_requests to see running processes, and sys.dm_exec_query_stats to see stats on queries that have run in the past but still have their plans in cache, including frequency of running and average resource use per query. 您可以使用sys.dm_exec_requests视图查看正在运行的进程,并使用sys.dm_exec_query_stats视图查看过去运行但仍在缓存中的计划的查询统计信息,包括运行频率和每个查询的平均资源使用情况。

These views include a column called SQL_HANDLE which can be used to probe the function sys.dm_exec_sql_text() documented here 这些视图包括一个称为SQL_HANDLE的列,可用于探查此处记录的函数sys.dm_exec_sql_text()

(This function can also be joined directly to the first two tables I mentioned -- there are examples in the doc.) (此函数也可以直接连接到我提到的前两个表中-文档中有示例。)

There's a good blog on the topic here 有关于这一主题的博客好这里

Once you find a running query that you want to kill, you can issue the KILL command, based on the session_id reported in sys.dm_exec_requests, from an interactive query tool or the portal's SQL interface as long as you have admin privileges. 找到要终止的正在运行的查询后,只要您具有管理员权限,就可以从交互式查询工具或门户网站的SQL界面基于sys.dm_exec_requests中报告的session_id发出KILL命令。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM