Unfortunately the BOL is a little vague on this, but index_id = 0
on sys.indexes
or sys.partitions
appears to refer to the table itself where there is no clustered index on the table. True - or am I missing something?
相关问题
- sql execution latency when assign to a variable
- What is the best way to cache a table from a (SQL)
- php PDO::FETCH_ASSOC doesnt detect select after ba
- Bulk update SQL Server C#
- SQL to Parse a Key-Value String
相关文章
- Entity Framework 4.3.1 failing to create (/open) a
- Code for inserting data into SQL Server database u
- Delete Every Alternate Row in SQL
- Linux based PHP install connecting to MsSQL Server
- SQL Azure Reset autoincrement
- How do we alias a Sql Server instance name used in
- Is recursion good in SQL Server?
- How can I convert a OLE Automation Date value to a
No, For heap based tables it will always exist and it refers to the IAM (Index Allocation Map). For tables with clustered indexes it will not exist.
Notice the "type_desc" is HEAP on these indexes, there is a really good blog entry about the Index Allocation Map.
So, Heap tables (ones with no clustered index) will always have one index with entry
index_id = 0
, and tables with clustered indexes will always have an entry withindex_id = 1
.