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

时间:2020-12-11 03:06:32

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. Question: does Azure Database do the same thing? I know SQL Server Express does not do this, for example. 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).

SQL Server Enterprise Edition的查询优化器将使用视图中的索引来提高查询的性能,即使查询中没有显式地引用视图(如果适用的话)。问:Azure数据库也做同样的事情吗?例如,我知道SQL Server Express不会这样做。我想确保我仍然能够从查询优化器中获得我需要的性能,当在一个与几百万用户的联接表上进行排序时(在企业版上工作很好,但是在这种情况下需要几秒钟的时间)。

1 个解决方案

#1


0  

Sometime last year (2012) Microsoft announced that the engine was the same between SQL Server and SQL Azure (now called Windows Azure SQL Database :/). 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. 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. 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.

去年(2012)的某个时候,微软宣布,在SQL Server和SQL Azure(现在称为Windows Azure SQL数据库:/)之间,引擎是一样的。你可能会得到相同的行为。同样的表现可能是另一个问题。Windows Azure SQL数据库也在硬件故障时保留副本。你可以从二手书中获益,它以一种对你来说天衣无缝的方式出现在网上。但是,这确实有一点性能成本。此外,Windows Azure中运行的SQL也在共享环境中运行。很好的证明了性能与本地专用多处理器机器的快速存储是不同的。这是一个不公平的比较多用户,多实例和专用。对于许多应用程序来说,这已经足够快了,但不是全部。

#1


0  

Sometime last year (2012) Microsoft announced that the engine was the same between SQL Server and SQL Azure (now called Windows Azure SQL Database :/). 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. 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. 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.

去年(2012)的某个时候,微软宣布,在SQL Server和SQL Azure(现在称为Windows Azure SQL数据库:/)之间,引擎是一样的。你可能会得到相同的行为。同样的表现可能是另一个问题。Windows Azure SQL数据库也在硬件故障时保留副本。你可以从二手书中获益,它以一种对你来说天衣无缝的方式出现在网上。但是,这确实有一点性能成本。此外,Windows Azure中运行的SQL也在共享环境中运行。很好的证明了性能与本地专用多处理器机器的快速存储是不同的。这是一个不公平的比较多用户,多实例和专用。对于许多应用程序来说,这已经足够快了,但不是全部。