What is a clustered index in a database, and how does it differ from a non-clustered index?

  • Arranges data rows physically based on the indexed column(s).
  • Can be created on any column in the table.
  • Stores the index separately from the actual data rows.
  • Supports faster retrieval of data but slows down data modification operations.
A clustered index dictates the physical order of data rows in the table, often based on the primary key column. In contrast, a non-clustered index stores a separate list of pointers to the actual data rows, allowing for different orders of retrieval. Understanding this distinction is crucial for efficient data retrieval and modification strategies.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *