IKH

Clustered vs Non-Clustered Indexing

As you learnt in the previous segments, indexing is an important aspect of optimising queries. You can speed up query processing by applying filters on an indexed column. In the upcoming video, you will learn about the two types of indices.

In this video, you learnt that there are two types of indices: clustered and non-clustered. The major differences between these are summarised in the table given below.

Clustered IndexNon-Clustered Index
This is mostly the primary key of the table.This is a combination of one or more columns of the table.
It is present within the table.The unique list of keys is present outside the table.
It does not require a separate mapping.The external table points to different sections of the main table.
It is relatively faster.It is relatively slower.

In the next segment, you will learn about the order in which the various parts of an SQL query are executed in the database engine. This will enable you to write the most optimal query for a given problem statement.

Report an error