How does database tuning advisor calculate total estimated improvement for a workload?

Lyle Risius 1 Reputation point
2021-03-03T16:40:06.87+00:00

Hi, I'm a newbie to database tuning advisor and haven't been able to find an answer to this question. When I run DTA against a workload, it gives me a total estimated improvement number for that workload and recommends adding statistics and/or indexes for 5 tables. I this case, the estimated improvement is 75%, When I run run "Evaluate Recommendations" for all the recommendations for each individual table, the highest estimated improvement is 27% and the sum of all 5 is 57%. Based on other threads, I think I understand what the estimated improvement value means for an individual change like a new index, but I don't understand how DTA comes up with 75% unless there is some kind of synergy between the changes. I've read enough to not blindly trust DTA and would not do an "apply all", I just am curious how this number is calculated. Thanks!

SQL Server Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Olaf Helper 47,436 Reputation points
    2021-03-04T07:26:56.72+00:00

    Hello,

    The DTA let the database engine creating an execution plan for the query, evaluates it and tries to generates may useful indexes as "Hypothetical indexes" in the database engine, create new execution plan and compares the result.

    DTA overacts this a bit, it sometimes adds tons of columns to the INCLUDE clause to get a full-covering index.

    SQL Server Index Architecture and Design Guide


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.