Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Indexes on expressions
Partial indexes
Clustered indexes
11. What clustered indexes are
Summary

Instruction

The last advanced topic we'd like to briefly mention is clustered indexes.

The indexes we've worked with so far were all non-clustered indexes. The data in the tables was physically stored on the hard drive in a certain order, and the indexes we created did not change that order in any way. The indexes only pointed to specific places on the hard drives, telling the database under which "addresses" the given rows could be found.

Some databases also provide clustered indexes. A clustered index reorganizes the way the rows are stored physically on the hard drive(s). In other words, the data on the hard drive is stored in the same order as the data in the index. There can be only one clustered index per table.

LEAD

Each database implements clustered indexes differently (or doesn't implement them at all). Clustered indexes can even have different names – Oracle uses the term index-organized tables.

The syntax also differs from one database engine to another. The details are outside the scope of this course – if you need to work with clustered indexes, read your database's documentation to learn more.

Exercise

Click Next exercise to continue.