首页 > 数据库技术 > 详细

sql server 索引分析相关sql

时间:2015-12-25 15:13:54      阅读:231      评论:0      收藏:0      [点我收藏+]

select object_id(‘dbo.FT_CFP_TRADE_SUBACCOUNT‘)

select * from sys.partitions where [object_id]=1467256382

select * from sys.allocation_units where container_id=72057594139049984

select * from sys.system_internals_allocation_units where container_id=72057594139049984
SELECT * FROM sys.dm_db_index_physical_stats(db_id(),object_id(‘dbo.MM_RealQuoteHistory_11‘),null,null,‘sampled‘)
SELECT * FROM sys.dm_db_index_physical_stats(db_id(),object_id(‘dbo.MM_RealQuoteHistory_11‘),null,null,‘DETAILED‘)

SELECT object_name(a.object_id) [TableName] ,a.index_id ,name [IndexName] ,avg_fragmentation_in_percent,
a.*,b.*
FROM sys.dm_db_index_physical_stats ( DB_ID() , NULL , NULL, NULL, NULL ) AS a
JOIN sys.indexes AS b ON a.object_id = b.object_id AND a.index_id = b.index_id

dbcc SHOWCONTIG (‘dbo.MM_RealQuoteHistory_11‘)

sql server 索引分析相关sql

原文:http://www.cnblogs.com/hongb/p/5075863.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!