Microsoft KB Archive/75191

= INFO: Explanation of Index ID's Found in SYSINDEXES =

Article ID: 75191

Article Last Modified on 2/14/2005

-

APPLIES TO


 * Microsoft SQL Server 4.21a Standard Edition

-



This article was previously published under Q75191



SUMMARY
The indid column of the sysindexes table can have values ranging from 0 to 255. The following article defines three of these values (0, 1, and 255) and how they are used by SQL Server.



MORE INFORMATION
The pages allocated to an object are subdivided with an &quot;index ID&quot; tag that is stored on every page. All of the pages with a particular indid are chained together. The sysindexes table contains a separate row for each indid so the beginning page and ending page in the chain can be found, and the root page and distribution page can be found for indexes.

Pure data pages have indid=0. Clustered index pages and the data pages have indid=1 (remember, the leaf of a clustered index is the data). However, there can never be indid=0 and indid=1 at the same time (except, perhaps during the creation of a clustered index on a table that already contains data).

Text and image pages need to be chained together independently of the data page chains and index page chains. Indid=255 is used to tag these types of chains. If a single table has several text or image columns, there is still only one indid=255 entry in sysindexes. The &quot;first&quot; column in sysindexes can no longer be considered head-of-chain for indid=255.

The indid is stored on each page in a single byte. All text or image pages for a particular table have indid=255. Another byte is normally used for the number of the index tier this index page belongs to (leaf=0).

On text/image pages, the byte is used for a &quot;sub-indid&quot; number. All text or image pages have indid=255, but the first text or image column has &quot;sub-indid&quot;=255; the second text or image column in that table has &quot;sub-indid&quot;=254, and so on.

Additional query words: Transact-SQL Windows NT

Keywords: kbinfo kbother KB75191

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.