Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,我正在使用 SQL SERVER 2008 R2,我想知道如何获取特定对象的碎片整理索引页大小,使用脚本在 sql server 2008 r2 中进行索引。有人可以帮我弄到这个吗?谢谢!在高级。
使用此查询:
SELECT object_id, index_id, avg_fragmentation_in_percent, page_count FROM sys.dm_db_index_physical_stats(DB_ID('AdventureWorks'), OBJECT_ID('HumanResources.Employee'), NULL, NULL, NULL)