Azure每天数百万次查询列名称 [英] Azure querying for column names millions of times per day

查看:63
本文介绍了Azure每天数百万次查询列名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在调查我在基本Azure SQL DB上遇到的一些数据库性能问题。我注意到在过去24小时内占据12%DTU的头号查询是这样的:


(@表nvarchar(11))SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS TABLE_NAME = @表<​​/ p>

从附带的屏幕截图中可以看出,这个网站每小时运行数十万次,每天只有几百个用户。我的应用程序中的某些内容当然可能会生成此查询但我不知道是什么。如果从Azure发生这种情况会有什么办法告诉我们吗?


与此同时,我将在本地分析应用程序以查看问题是否在我身边。期待任何想法。在此先感谢您的帮助!



解决方案

Hello,



您可以通过将应用程序连接到on来调试此问题-premises数据库的副本,然后使用SQL Server Profiler,以便从存储过程中识别出来。





我建议您使用Query Stored来识别显示性能问题的其他查询。





http:/ /www.sqlcoffee.com/Azure_0010.htm







希望这会有所帮助。







问候,



Alberto Morillo

SQLCoffee.com



I'm investigating some DB performance issues I'm having on a basic Azure SQL DB. I noticed that the number one query that has taken 12% of my DTUs in the last 24 hours is this:

(@Table nvarchar(11))SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS where TABLE_NAME=@Table

As you can see from the attached screenshot, this is running hundreds of thousands of times per hour on a site that only gets a few hundred users a day. It is certainly possible that something in my application could be generating this query but I don't understand what. If this was happening from Azure would there be any way to tell?

In the meantime I'll profile the application locally to see if the issue is on my side. Looking forward to any thoughts. Thanks in advance for your help!


解决方案

Hello,

You can debug this by putting your application to connect to an on-premises copy of the database and then use SQL Server Profiler as you want to identify from what stored procedure is coming.

Let me recommend you Query Stored to identify other queries showing performance issues.

http://www.sqlcoffee.com/Azure_0010.htm



Hope this helps.



Regards,

Alberto Morillo
SQLCoffee.com


这篇关于Azure每天数百万次查询列名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆