What is the difference between a clustered and a non-clustered index?
💡 Model Answer
A clustered index determines the physical order of rows in a table; there can be only one per table. A non‑clustered index is a separate structure that contains the indexed key values and a pointer (row ID or cluster key) to the actual data row. Clustered indexes are faster for range queries that follow the key order, but they can be slower to update because rows may need to be moved. Non‑clustered indexes allow multiple indexes per table and are useful for lookups on columns that are not the primary key. They require an extra lookup to fetch the data row, but they do not affect the physical order of the table.
This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.
🎤 Get questions like this answered in real-time
Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers on a discreet on-screen overlay.
Get Assisting AI — Starts at ₹500