Databases Reference
In-Depth Information
Let's take a quick tour to some of these concepts. To get started, create a new table on the
AdventureWorks
database:
SELECT
*
INTO
dbo.SalesOrderDetail
FROM
Sales.SalesOrderDetail
Listing 4-8.
Copy the following query and save it to a file:
SELECT
*
FROM
dbo
.
SalesOrderDetail
WHERE
ProductID
=
897
Listing 4-9.
Open a new DTA session, and you can optionally run a SQL Server Profiler session
if you want to inspect what the DTA is doing. On the
Workload File
option, select the
file containing the SQL statement that you just created with Listing 4-9, and specify
AdventureWorks
as both the database to tune and the database for workload analysis.
Click the
Start Analysis
button and, when the DTA analysis finishes, run this query to
inspect the contents of the
msdb..DTA_reports_query
table:
SELECT
*
FROM
msdb
..
DTA_reports_query
Listing 4-10.