From the course: SQL Server 2016: Administer a Database Infrastructure

Unlock the full course today

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

Identify and correct outdated statistics

Identify and correct outdated statistics - SQL Server Tutorial

From the course: SQL Server 2016: Administer a Database Infrastructure

Start my 1-month free trial

Identify and correct outdated statistics

- [Instructor] Let's take a look at the statistics that already exist in the 'application.people' table in the wide world employers database. First I want to make sure I'm using that database. Then, we can find the statistics by expanding the database over in the object explorer, opening up the tables folder, in able to find the table that we want to work with, which is 'application.people'. Inside of there, we'll expand the statistics folder. Here we can see that we have several different statistics objects already built on the indexes on this table. We have one for 'application.people' full name. We have Application People IsEmployee, IsSalesperson. This one here with the serial number at the end of it, and then finally the statistics objects for the primary key on the 'application.people' table. We can use the database counsel command called DBCC statistics to view the density and distribution of values that are contained in the index. We can see it here on line number five. It…

Contents