Azure SQL数据库上的资源调控器(非托管实例) [英] Resource Governor on Azure SQL Database (Not managed instance)

查看:55
本文介绍了Azure SQL数据库上的资源调控器(非托管实例)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有以下问题:当用户运行一个非常长且CPU密集型的查询时,整个数据库被锁定(当另一个用户尝试运行另一个查询,其中一个被第一个查询阻止。)

I have the following problem: when an user runs a very long and CPU-intensive query, the entire database is locked (when another user tries to run another query, that's one is blocked by the first one).

例如,我们注意到我在大型表上执行ALTER TABLE语句阻止了另一个用户在不同的
表上执行SELECT TOP(1000)*等性能查询。 
那么,这就是使用AZURE SQL SERVER w的含义多个用户?

所以我需要一种方法来限制Azure SQL数据库(非托管实例)上的资源。遗憾的是,Azure SQL数据库不提供资源调控器。你知道是否有类似的东西吗?

So I need a way to limit the resource on an Azure SQL Database (Not managed instance). Unfortunately, Azure SQL Database doesn't provide Resource Governor. Do you know if there is something similiar?

推荐答案


你好,¥b $ b



在SQL Server上的一项功能命名资源调控器(RG)用于限制资源消耗。资源调控器是SQL Azure保护机制的一部分,但作为我们可以配置的功能,我们无法获得
。我的建议是使用批处理来防止影响阻塞对性能的影响。





https://docs.microsoft.com/en-us/azure/sql-da tabase / sql-数据库使用 - 批处理 - 提高绩效





当您执行ALTER TABLE时,表格在语句的持续时间内被阻止,表格越大,您可能等待的时间越长。更改结构的操作对象采用更具限制性的模式锁(例如Sch-M)
,它阻止对要修改的对象的所有并发访问。如果要向表中添加列,将它们添加为可为空可被视为 
元数据更改,表格以块的形式更新,您可能会看到更好的效果。


When you perform an ALTER TABLE unfortunately the table is blocked for the duration of the statement, and the bigger the table the more time you may wait. Operations that change the structure of an object take much more restrictive schema locks (e.g. Sch-M) which prevent all concurrent access to the object being modified. If your are adding columns to a table, adding them as nullable is considered a  metadata change and the table is updated in chunks, and you may see a better performance.





希望这会有所帮助。





问候,



Alberto Morillo


SQLCoffee.com


这篇关于Azure SQL数据库上的资源调控器(非托管实例)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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