Difficulty: Easy
Correct Answer: Nonclustered
Explanation:
Introduction / Context:
Understanding how clustered and nonclustered indexes store information at the leaf level is essential for choosing the right indexing strategy for performance and storage.
Given Data / Assumptions:
Concept / Approach:
A clustered index's leaf level contains the data rows themselves (the table is ordered as the clustered index). A nonclustered index's leaf level contains key values plus row locators (RID or clustering key) that point to the underlying data.
Step-by-Step Solution:
Verification / Alternative check:
Query execution plans often show a Key Lookup/RID Lookup when a nonclustered index is used and additional columns are fetched from the base table via the locator.
Why Other Options Are Wrong:
Clustered: leaf contains data, not just pointers. Primary/Secondary: terminology not specific to SQL Server leaf-level storage.
Common Pitfalls:
Assuming “primary” means clustered; in SQL Server a primary key may be implemented as clustered or nonclustered.
Final Answer:
Nonclustered
Discussion & Comments