Programatically read SQL Server's query plan suggested indexes for a specific execution of SQL?
If I run this command in SSMS: set showplan_xml on GO exec some_procedure 'arg1', 'arg2','arg3' GO set showplan_xml off GO I get XML output of the full call stack involved in the query execution, as well as any suggested indexes etc. How might one read this from C#? (One use case might be to periodically enable this and log these results in a production environment to keep an eye on index suggestions.) This is, for the most part, two separate (though related) questions. Is it possible to capture or somehow get the Missing Index information? If you want only the Suggested Indexes (and don't