Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identifying Index Fragmentation

Status
Not open for further replies.

Skittle

ISP
Sep 10, 2002
1,528
US
I've tried out the SQL 2005 fragmentation check on an index thus on the standard AdventureWorks database:-

Code:
SELECT INDEX_ID, AVG_FRAGMENTATION_IN_PERCENT,
                 AVG_PAGE_SPACE_USED_IN_PERCENT
FROM SYS.dm_db_index_physical_stats(
               db_id('Adventureworks'), 
               Object_ID('Person.Address'),
               Object_Id('AK_Address_rowguid'),
               DEFAULT,
               'DETAILED')

I expected to see a nice one row returned value - just like the the examples in my books. Instead I get a multi-row returned value AND Index identities are represented more than one. What gives? Why am I getting multiple rows returned instead of one row with two percentages for the index I have selected?


Dazed and confused
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top