O'Reilly logo

Microsoft SQL Server 2012 Performance Tuning Cookbook by Bihag Thaker, Ritesh Shah

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Analyzing queries using Database Engine Tuning Advisor

There are few different ways that can help you in providing workload to DTA. One of the popular ways is to ask DTA about the query you are designing at the moment for performance point of view, so that DTA can analyze the query and provide suggestions, if any.

Getting ready

We will need two tables to demonstrate this recipe. Here is the script to create the same:

USE AdventureWorks2012
GO
IF OBJECT_ID('ProductDemo') IS NOT NULL
DROP TABLE ProductDemo
GO
IF OBJECT_ID('ProductModelDemo') IS NOT NULL
DROP TABLE ProductModelDemo
GO
select * into ProductModelDemo from Production.ProductModel
select * into ProductDemo from Production.Product
GO

We have just created two tables, named ProductDemo and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required