简体   繁体   English

使用视图索引的Azure数据库查询优化器

[英]Azure Database Query Optimizer using View Indices

SQL Server Enterprise Edition's query optimizer will use indices from a view to increase performance of a query even if the view is not explicitly referenced in the query, if applicable. SQL Server Enterprise Edition的查询优化器将使用视图中的索引来提高查询的性能,即使该视图未在查询中明确引用(如果适用)。 Question: does Azure Database do the same thing? 问题:Azure数据库是否做同样的事情? I know SQL Server Express does not do this, for example. 例如,我知道SQL Server Express不会这样做。 I want to ensure I can still get the performance I need from the query optimizer when doing a sort on a joined table with a few million users (works great on enterprise edition but takes several seconds on express - bottle neck at the sort). 我想确保在对具有数百万用户的联接表上进行排序时,仍然能够从查询优化器中获得所需的性能(在企业版上效果很好,但在快速版上则需要花费几秒钟的时间-处于瓶颈)。

Sometime last year (2012) Microsoft announced that the engine was the same between SQL Server and SQL Azure (now called Windows Azure SQL Database :/). 去年的某个时候(2012年),Microsoft宣布SQL Server和SQL Azure(现在称为Windows Azure SQL数据库:/)之间的引擎相同。 So you will likely get the same behavior. 因此,您可能会得到相同的行为。 Same performance may be another question. 同样的性能可能是另一个问题。 Windows Azure SQL Database is also keeping replicas in place in the event of hardware failure. 发生硬件故障时,Windows Azure SQL数据库还将副本保留在原位。 You get the benefit of the secondary coming online in a fashion that is seamless to you. 您可以通过对您而言无缝的方式来获得次要服务器的好处。 But, This does have a bit of a performance cost. 但是,这确实会降低性能。 Also, the SQL running in Windows Azure is running in a shared environment. 另外,在Windows Azure中运行的SQL在共享环境中运行。 It is pretty well documented that the performance is not the same as a local dedicated multi-processor machine with fast storage. 相当有据可查的是,其性能与具有快速存储功能的本地专用多处理器计算机不同。 It is a bit of an unfair comparison multi-user, multi-instance vs. dedicated. 多用户,多实例与专用的比较有点不公平。 For many applications this is fast enough, but not all. 对于许多应用程序来说,这足够快,但并非全部。

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

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