From the course: SQL Server 2022 Administration

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Configure clustered indexes

Configure clustered indexes

In terms of finding data in a SQL Server table or a set of SQL Server tables, the query optimizer uses what are called indexes. And indexes are very, very important in doing just that, indexing into tables to find things. And there are two primary kinds of indexes that SQL Server utilizes. In this lesson, we're going to focus on clustered indexes. Think of a clustered index as a dictionary. All of the data in a dictionary is stored from A to Z, and if I need to find a particular word, panda, I flip to p, pa, pan, panda. And not only have I found the word I need, "panda," I found the data, the definition. So that index is inherent in the way the data is stored. Now, if you think of an index in a book, that's more like a non-clustered index. So the way that works is I take, say, an encyclopedia and I want to find entries in this encyclopedia about pandas. So I go to the back of the book and I look in what is called an index and I find panda. I don't find any data about panda there, but…

Contents