investigate-statistics-issues
Installation
SKILL.md
Statistics Issues Investigation
Investigates statistics health across 20 diagnostic steps: staleness, histogram quality, plan cache impact, index correlation, auto-update thresholds, duplicates, and more.
Required tools
- A SQL query tool connected to the target server and database. Prefer, in order: the SQL Tools MCP
server that ships with the
microsoft-sql-adminplugin (mssql_list_database_connections,mssql_connect_database, thenmssql_execute_query); any other SQL tool the agent host provides for running T-SQL and reading result sets;sqlcmdfrom a terminal. The diagnostic queries are read-only; runUPDATE STATISTICS,CREATE/DROP STATISTICS, orALTER DATABASEremediation only when the user asks for it. If the SQL Tools MCP server is not connected or lists no connections, follow thesql-tools-mcp-setupskill, which asks before installing or configuring anything. If no SQL tool can be made available, give the user the T-SQL to run and ask for the results.