Chapter 26
Indexes, Part 3: Clustered vs Non-Clustered
The Difference
Imagine you have a bookstore. You need to sort it somehow. You can sort by author, by genre, by length, or by name. But you have to choose. This will be your key, and the books can only be ordered one way. You can't simultaneously order by author and by name — you just have a certain amount of books, and they can only sit on the shelf in one order.
Let's say you decide to order by name, alphabetically, and you don't care about author or genre. This is your CLUSTERED KEY and CLUSTERED INDEX.
Part of the full course
Unlock this chapter
This one is part of the paid course. Everything before the interview, the free sampler articles, the Core Java drills, and mock interviews stay open either way.