From the course: SQL Server Performance for Developers

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Overview of nonclustered indexes

Overview of nonclustered indexes - SQL Server Tutorial

From the course: SQL Server Performance for Developers

Start my 1-month free trial

Overview of nonclustered indexes

- [Instructor] The next topic in indexing is going to be nonclustered indexes. So, we've talked about how clustered indexes make up all the pages of the table stored in the order of the key. Nonclustered indexes are really what I like to think of as supplemental indexes for how we query our data. For example, you're typically going to want to add a nonclustered index to the column that's in your WHERE clause and your most commonly run queries. And this is where it helps to have an understanding of the pattern of your application and how it's used. You want to know most of the queries that your application is usually running, and this is where using things like stored procedures can be beneficial over Dynamic SQL or letting users craft ad hoc SQL, because it's extremely difficult to divine a pattern from users ad hoc querying your database as opposed to you having program code or even stored procedures that are accessed through reports that query your database in a predictable fashion.…

Contents