beginnerIndexes — Clustered, Non-Clustered, Composite, Covering

What is the difference between a clustered and non-clustered index?

Clustered index: the table data is physically stored in the order of the index key. One per table. In SQL Server: every table has one clustered index (by default on PRIMARY KEY). In MySQL InnoDB: the primary key IS the clustered index. In PostgreSQL: no native clustered index; CLUSTER command physically reorders data once but doesn't maintain order on DML. Non-clustered index: a separate B-Tree st

This is a Pro chapter

Sign in, then upgrade to Pro or Power to unlock this and the full Databases Mastery library.

What is the difference between a clustered and non-clustered index?

Next Step

Continue to What is the leftmost prefix rule for composite indexes?← Back to all SQL questions