This update improves the tempdb spill diagnostics by making the following changes in SQL Server 2017:
- Adds the following columns to the sys.dm_exec_query_stats, sys.dm_exec_procedure_stats, and sys.dm_exec_trigger_stats DMVs.
|total_spills||bigint||Total number of pages spilled by execution of this plan since it was compiled.|
|last_spills||bigint||Number of pages spilled the last time the plan was executed|
|min_spills||bigint||Minimum number of pages that this plan has ever spilled during a single execution|
|max_spills||bigint||Maximum number of pages that this plan has ever spilled during a single execution|
- Adds the following counters to the sql_statement_completed, sp_statement_completed, and sql_batch_completed Extended Events.
|sql_statement_completed||spills||bigint||The number of pages that were written while spilling data by the statement|
|sp_statement_completed||spills||bigint||The number of pages that were written while spilling data by the stored procedure|
|sql_batch_completed||spills||bigint||The number of pages written while spilling data by the batch.|