How Is My T-SQL Query Executed?
Microsoft’s SQL Server query optimizer uses a cost-based approach by deciding on the “good enough” way — not necessarily the best way to retrieve results. This is because considering all possibilities for retrieving the data might be inefficient.
Read more