Databases Reference
In-Depth Information
Figure 5-19
Now you have received Profiler tracing results. In the next section, you will see result analysis and
brief tuning.
Analysis and Tuning
The very last event in Figure 5-20 is the query statement from your simulation script, so you ignore
it. The Duration column is sorted in a descending order. The highlighted portion in the second-to-last
row indicates a duration of 17582 milliseconds, and an exec marriage query statement under the TextData
column, showing that it is one of the longest queries in this trace.
Now, based on the trace information, you can start to investigate tuning opportunities for identified
long-running queries.
For a quick illustration on how to find obvious tuning opportunities, you will use SQL Server 2005
Database Tuning Advisor (DTA). Type exec marriage from a new Query session within SQL Server
Management Studio, and then right-click Analyze Query in Database Tuning Advisor (See Figure 5-21).
Enter a session name for a future reference, and then click Start Analysis (see Figure 5-22).
If you were connected to the SQL Server in the SQL Server Management Studio by using SQL Server
authentication, you will have to re-connect to a server instance and select a database to tune before you
can click Start Analysis. Otherwise, if your used Windows Authentication, you will not be asked to
re-connect to the server instance again.
Search WWH ::




Custom Search