Dennis Bottjer | ASP.NET + SharePoint Architect, Trainer & Speaker

"An Ounce of Prevention is Worth a Pound of Cure" - Ben Franklin
posts - 168, comments - 59, trackbacks - 41

My Links

News

Add to Technorati Favorites The views expressed in this blog are mine and mine alone, not that of my employer, Microsoft, or anyone else’s. No warrantee is given for the quality of any material on this site.

Tag Cloud

Archives

Post Categories

Space Used By SQL Indexes

1
2
3
4
5
6
7
8
9
10
11
select 
[name] As IndexName,
type_desc,
space_used_in_kb = (page_count * 8.0),
space_used_in_mb = (page_count * 8.0 / 1024.0)
from
sys.indexes I
inner join
sys.dm_db_index_physical_stats(db_id(), object_id('.'), null, null, null) P on I.[object_id] = P.[object_id] and I.[index_id] = P.[index_id]
Order By
  space_used_in_kb desc

Print | posted on Monday, October 30, 2006 6:59 AM | Filed Under [ SQL & LINQ ]

Feedback

Gravatar

# Space Used By SQL Indexes

11/1/2006 10:31 PM | www.dotnetkicks.com
Comments have been closed on this topic.

Powered by: