Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Understanding Index ID

Author  Topic 

jbates99
Constraint Violating Yak Guru

396 Posts

Posted - 2014-02-03 : 11:17:47
As you see below, this index has severe fragmentation.
This table has a PK as well as a few regular indexes.

Is Index ID 0 always the Primary Key? Is there a way of determining exactly which index the ID # relates to?
Thanks, Jack

index ID: 0, database ID: 8
TABLE level scan performed.
- Pages Scanned................................: 65904
- Extents Scanned..............................: 8386
- Extent Switches..............................: 8385
- Avg. Pages per Extent........................: 7.9
- Scan Density [Best Count:Actual Count].......: 98.24% [8238:8386]
- Extent Scan Fragmentation ...................: 71.54%
- Avg. Bytes Free per Page.....................: 208.6
- Avg. Page Density (full).....................: 97.42%

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2014-02-03 : 12:13:41
Index_id=0 is a heap: http://technet.microsoft.com/en-us/library/ms173760.aspx

Use object_id, name to determine which index it is.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -