Index Tuning Wizard

A short SQL Server 2000 tutorial explaining how to use the SQL Profiler in combination with the Index Tuning Wizard to optimize your database.

Step 2: The Tuning Wizard.

After we close the SQL Profiler we are back in the Enterprise Manager and here we are going to run a Wizard as shown in Figure 8.

Figure 8

From the multitude of Wizards, some call this screen the Wizards Wizard, expand the Management group and select Index Tuning Wizard and click OK.

Figure 9

As with all wizards, a description pops up and we click Next after reading it.

Figure 10

First up we need to tell the Wizard which Server instance and which database to tune, I'm tuning my FIS_Portal database, and we tell it to Keep all existing indexes (since I had none) and offcourse I select Add indexed views and I set the tuning mode to Thorough, which takes the longest but has the best results.

Figure 11

After we click Next we need to specify our workload, this is the table created in Step 1, so we setup our database and tell what table to use and we click on OK.

Figure 12

Next we can finetune the nr of queries to run and since I know that 200 queries out of my workload will cover every possible table in my Database I will limit it to 200 and I will use the other default settings as well.

Figure 13

In Figure 14 we are asked what tables should be analysed and since I do not care how long it takes I select ALL tables, I rather spend 5 minutes longer waiting for the tuning process to finish then find out later that some tables are still slow with returning data, so ALL tables it is.

Figure 14

Upon pressing Next the Index Tuning Wizard is going to do it's job, it's going to re-execute the Workload data and examine all execution plans that accompany these queries and based on this info the Tuning Wizard returns Figure 16.

Figure 15

Figure 16 shows a complete list with recommended indexes, as you can see in Figure 16 for some tables it recommends a NON-Clustered index, this is most likely because there's no data in those tables yet and therefor it suggests the cheaper index.

Figure 16

When we click on Analysis we get more detailed information on how indexes were used, you can even save this report for future benefit.

Figure 17

When we close this report and click next we again get the last screen in the Wizard, Figure 18, which gives you a last opportunity to CANCEL or go back to make changes.

Figure 18

Now when we press complete all our indexes will be created for us and that concludes this tutorial about the Index Tuning Wizard.

Goto Part 1

Read more about Clustered and NON-Clustered indexes

Read more about the Index Tuning Wizard

Dennis van Galen

Dennis van GalenDennis started his career as order picker in warehouses. In the past 10 years he did alot of data-entry work for Government agencies and around the age of 20 he helped clean the KPN Telecom customer databases. At the age of 27 Dennis returned to KPN Telecom where he was a full time webmaster / webdeveloper. In his spare time he used to be a voluntary Manager for DMXzone.com. After leaving KPN in 2012 Dennis worked for Tevreden.nl on webbased customer satisfaction platforms.

In the past 12 years Dennis became experienced with various webtools, web-languages and database systems.

See All Postings From Dennis van Galen >>

Comments

Be the first to write a comment

You must me logged in to write a comment.