繁体   English   中英

SQL Server-动态管理视图-全表扫描

[英]SQL Server - Dynamic Management Views - Full Table Scan

我试图找出动态管理视图,它将为SQL Server 2005提供以下信息。

  1. 经过全表扫描的表格
  2. 导致表进行全表扫描的查询
  3. 扫描时间
  4. 完成扫描所需的时间
  5. 查询返回的记录数
  6. 扫描时表中的记录总数。

我尝试了一些DMV文章,但无法弄清楚所需的DMV查询。 如果在SQL Server 2005中无法实现,请提供2008版本的这个版本吗?

如果有人看到这种情况-从SQL Server 2008R2开始, sys.dm_exec_query_stats具有4个额外的列,这些列可能对第5点有用。

total_rows – Total number of rows returned by query
last_rows – Number of the rows return by the last execution of the query
min_rows – Minimum numbers of the rows returned by the query since it is compiled
max_rows – Maximum numbers of the rows returned by the query since it is compiled

(描述取自此处 -它说它是Denali的新功能,但2008 R2也包含它们)。

以下SYS.DM_DB_INDEX_USAGE_STATS应该可以为您提供大部分内容。 5和6可能不会。

暂无
暂无

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

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