Administering a SQL Database Infrastructure — Question 170
You are the new database administrator for a SQL Server 2014 instance.
You conduct an assessment on the instance and determine that the auto create statistics setting on the database named DB1 has been turned off.
You see no evidence that any maintenance has been occurring. You want to set up monitoring to see if query performance is being affected. You need to set up a monitoring process that will capture any cases where statistics could have been useful if they existed.
What should you do?
Answer options
- A. Create a SQL Server Agent job to execute DBCC SHOWSTATISTICS on each of the primary key columns in the database.
- B. Use the missing_column_statistics extended event.
- C. Query the sys.statistics system view to see all cases where the statistics were last needed.
- D. Write a query using the sys.dm_db_missing_index_group_stats DMV Joining to sys.indexes, filtering on is_hypothetical.
Correct answer: B
Explanation
The correct answer is B because using the missing_column_statistics extended event allows you to capture instances where missing statistics could have benefitted query performance. The other options either do not provide the necessary monitoring capability or require more manual effort without directly addressing the need for tracking missing statistics.