If you needed to optimize a SQL query using SSMS what steps would you take?
Utilisateur anonyme
I said that I would first execute the query and display the execution plan that is automatically created by SSMS. I would then apply any indexes that were recommended by the execution plan. If the query was still having issues or if no indexes were suggested I would go through the execution plan and look for any operations that are using a large percentage of resources and I would also look for any full table scans. If I was not able to find anything obvious in the execution plan I would then go into the query and see if I can find better ways to perform joins or remove any unnecessary sub-queries.