It is a complex task to optimize query as well as to validate the correctness and effectiveness of query optimizer. A query optimizer should estimate and compare the costs of executing a query using different execution strategies and should choose the strategy with the lower cost estimate. To fairly and realistically compare different strategies accurate cost estimation is required. This is a challenging task to measure quality of query optimization as modern query optimizers provide more advanced optimization strategies and adaptive techniques. This paper describes different ways to improve the performance of SQL Server queries, index optimization with occasional references to particular SQL code and how to achieve the best performance for the given tables and queries by giving some tips for query optimization in Microsoft SQL Server. The paper provides a detailed overview of query optimization, Optimization techniques, testing of optimization techniques that are used to validate the query optimizer of Microsoft’s SQL Server and issues in query optimization testing.
Leo Giakoumakis, "Cesar Galindo-Legaria – testing SQL server’s query optimizer: Challenges, techniques and experiences," IEEE Bulletin of the IEEE Computer Society Technical Committee on Data Engineering, pp. 1-8, 2008.
Gennady Antoshenkov, "Dynamic query optimization in Rdb/VMS," in Proc. of IEEE 9th International Conference on Data Engineering, 1993, pp. 538-547.