Understanding query optimization techniques
We understand that, sometimes, queries do not perform as expected, and users and businesses complain that queries or applications are running slow. Over time, queries start running slower as the load grows on the SQL Server. We need some tools and techniques to find the root cause of poorly performing queries and address these root causes based on the findings.
There are various techniques provided by Microsoft that we can use to diagnose and improve the performance of such poorly performing queries. Chapter 1 showed one such technique, which we already discussed in detail with examples. Other techniques involve adding proper indexes and maintaining indexes, which we will discuss in Chapter 10.
Another query optimization and performance improvement technique that we can use to diagnose the root cause of poor performance queries is query plans. Query plans are a roadmap, generated and used by the query optimizer to fetch the desired...