what is the difference between a CLUSTERED INDEX and a NON CLUSTERED INDEX?
  • A CLUSTERED INDEX sorts the column into order and maintains the index.
  • These are similar to a DICTIONARY where the values point to actual data.
  • By default, a CLUSTERED INDEX is created for a PRIMARY KEY column.
  • A table can contain only a single CLUSTERED INDEX.
  • A NON-CLUSTERED INDEX is created on non-key columns in the table
  • NON-CLUSTERED INDEXES don't require any sorting to store data.
  • The indexes are maintained in the form of a TREE with leaves pointing to actual data rows.
  • NON-CLUSTERED INDEXES take more space to maintain.
  • A table can contain more than one NON-CLUSTERED INDEXES

SQL •  Added one month ago

Join the Newsletter

Subscribe to get our latest content by email.
    We won't send you spam. Unsubscribe at any time.
    We use cookies to provide you with a great user experience, analyze traffic and serve targeted promotions.   Learn More   Accept