简体   繁体   English

MSSQL 每个表的最大统计数

[英]MSSQL Maximum number of statistics per table

As a general rule of thumb, is there a maximum/sensible number of statistics for an individual table on MS SQL Server?作为一般的经验法则,MS SQL 服务器上的单个表是否有最大/合理的统计数量?

I have a DB which I've noticed has over 100 statistics on a table with 6 indexes.我有一个数据库,我注意到在一个有 6 个索引的表上有超过 100 个统计信息。

Auto-created statistics ("WA") are created for columns specified as WHERE clause predicates that are not already indexed to help estimate row counts for better execution plans.为指定为WHERE子句谓词但尚未编制索引的列创建自动创建的统计信息 (“WA”),以帮助估计行数以获得更好的执行计划。

The "dta" stats are generated SSMS advisor tools. “dta”统计信息是生成的 SSMS 顾问工具。 These hypothetical stats may have been left behind from a tuning exercise that wasn't completed.这些假设的统计数据可能是未完成的调整练习留下的。 See this page from Brent Ozar's sp_Blitz for a script to identify and drop these.请参阅Brent Ozar 的 sp_Blitz 中的此页面以获取用于识别和删除这些的脚本。

The max number of stats is 30,000 according the maximum capacity specifications documentation .根据最大容量规范文档,最大统计数为 30,000。

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

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