Execution plan
Execution plans further the understanding of how the SQL is executing and where the inefficiencies may lie. If there are five tables involved and the query waits mostly on “PAGEIOLATCH_SH” possibly indicating a full table or index scan, the plan will help determine where that is occurring. Plans supply costing information, data access paths, join operations and many other things to aid in tuning efforts.
However, not all plans are useful. Do you know that getting a plan from SQL Server Management Studio (SSMS) can be wrong and not match how SQL Server is really executing the statement? It can be wrong because the query is executing from inside SSMS and not from the application code and environment. The application may set session variables that are not set from SSMS, parameter data types may be defined differently, and many other things. This plan is also for the present time, and may be much different than the plan used yesterday at 3:00 pm when the problem was occurring. If plans from SSMS