Databases Reference
In-Depth Information
Counter
Occurrence Value
optimizations
691473
1
elapsed time
691465 0.007806012
final cost
691465
1.398120739
trivial plan
29476
1
tasks
661989
332.5988816
no plan
0
NULL
search 0
26724
1
search 0 time
31420
0.01646922
search 0 tasks
31420
1198.811617
Table 5-1.
The query shown in Listing 5-2 displays the percentage of optimizations in the system
that include hints. This information could be useful to show how extensive the use of
hints in your application is, which, in turn, can show that your code may be less flexible
than anticipated, and may require additional maintenance. Hints are explained in detail
in Chapter 7.
SELECT ( SELECT occurrence
FROM sys . dm_exec_query_optimizer_info
WHERE counter = 'hints'
) * 100.0 / ( SELECT occurrence
FROM
sys . dm_exec_query_optimizer_info
WHERE counter = 'optimizations'
)
Listing 5-2.
 
Search WWH ::




Custom Search