【24h】

Statistics on Views

机译:观看统计

获取原文
获取原文并翻译 | 示例

摘要

The quality of execution plans generated by a query optimizer is tied to.the accuracy of its cardinality estimation. Errors in estimation lead to poor performance, erratic behavior, and user frustration. Traditionally, the optimizer is restricted to use only statistics on base table columns and derive estimates bottom-up. This approach has shortcomings with dealing with complex queries, and with rich languages such as SQL: Errors grow as estimation is done on top of estimation, and some constructs are simply not handled. In this paper we describe the creation and utilization of statistics on views in SQL Server, which provides the optimizer with statistical information on the result of scalar or relational expressions. It opens a new dimension on the data available for cardinality estimation and enables arbitrary correction. We describe the implementation of this feature in the optimizer architecture, and show its impact on the quality of plans generated through a number of examples.
机译:查询优化器生成的执行计划的质量与其基数估计的准确性有关。估计中的错误会导致性能不佳,行为不稳定和用户沮丧。传统上,优化器仅限于使用基表列上的统计信息,并自下而上得出估计值。这种方法在处理复杂查询和SQL之类的丰富语言时存在缺陷:随着在估算之上进行估算,错误会增加,并且某些构造根本无法处理。在本文中,我们描述了SQL Server中视图统计信息的创建和使用,这为优化器提供了有关标量或关系表达式结果的统计信息。它为可用于基数估计的数据打开了一个新的维度,并可以进行任意校正。我们将在优化程序体系结构中描述此功能的实现,并通过许多示例说明其对生成的计划质量的影响。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号