Difficulty: Easy
Correct Answer: Correct
Explanation:
Introduction / Context:
At the core of SQL Server’s traditional rowstore storage engine are two primary B-tree index organizations: clustered and nonclustered. Many specialized index types exist today, but they are generally built on or alongside these fundamental structures or serve different storage engines (e.g., columnstore).
Given Data / Assumptions:
Concept / Approach:
A clustered index defines the table’s physical row order; there can be at most one. Nonclustered indexes maintain a separate key order and reference the base table via a row locator (RID for heaps, clustering key for clustered tables). These two kinds underpin most tuning, covering, and seek strategies. While modern SQL Server versions add columnstore and others, the canonical answer for “kinds of indexes” in the classic sense remains clustered vs. nonclustered.
Step-by-Step Solution:
Verification / Alternative check:
Examine sys.indexes; note type values for clustered (1) and nonclustered (2) in rowstore, alongside other types for specialized indexes.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing heaps with an index type; assuming columnstore replaces B-trees universally; overusing nonclustered indexes without evaluating key/include design.
Final Answer:
Correct
Discussion & Comments