Databases Reference
In-Depth Information
Running that query shows the following output, (edited for space):
StatementString CurrentCost RecommendedCost
------------------------------------------- ------------ ---------------
SELECT * FROM dbo.SalesOrderDetail WHERE... 1.2434 0.00328799
Listing 4-11.
Notice that the query returns information like the query that was tuned, as well as the
current and recommended cost. The current cost, 1.2434, is easy to obtain by directly
requesting an estimated execution plan for the query as shown in Figure 4-6.
Figure 4-6: Plan showing total cost.
Since the DTA analysis was completed, the required hypothetical indexes were
already dropped. To now obtain the indexes recommended by the DTA, click on the
Recommendations tab and look at the Index Recommendations section, where you
can find the code to create any recommended index by then clicking on the Definition
column. In our example, it will show the code in Listing 4-12.
Search WWH ::




Custom Search