From the course: SQL Server 2022 Administration

Unlock this course with a free trial

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

Configure non-clustered indexes

Configure non-clustered indexes - SQL Server Tutorial

From the course: SQL Server 2022 Administration

Configure non-clustered indexes

So this lesson we're going to take a look at setting up and configuring non-clustered indexes. Now, if you set up clustered indexes or if you've gone through that lesson, this is going to seem very similar. In a lot of ways it is, but we're also going to talk about some things you can do with non-clustered indexes to help your performance that you wouldn't necessarily do with a clustered index. So let's dive in. In my WideWorldImporters database, I have a table here called Sales.OrdersCopy. It's just a copy of the sales orders table just without any indexes on it. I stripped it down to bare data. One exception, I do have a primary key on this table. So we're going to run some queries against this thing and see what we can do. New query, here we go. All right. So first I'll just do a select * from it so you can see what's in there. There we go. And it's just a copy. It's missing a few rows of deleted some stuff out of here through some other demos I've done, but it's missing a couple…

Contents