Are there any way to programmatically execute a query with Include Actual Execution Plan and see whether any index suggestion or not
问题 I have a quite good number of queries and i want to test each of them with Include Actual Execution Plan feature on sql server management studio However it is not possible for me to do this manually for 1m + queries So i wonder can i execute them programmatically (from c#) with Include Actual Execution Plan feature and see whether SQL server suggests any index or not 回答1: First, before I go in to how to get the Actual Execution Plan in code and find the ones that report needing indexes I