Query optimization in Microsoft SQL Server PDW - Shankar, Srinath; Nehme, Rimma; Aguilar-Saborit, Josep; Chung, Andrew; Elhemali, Mostafa; Robinson, Eric; Subramanian, Mahadevan Sankara; DeWitt, David; Galindo-Legaria, César; Halverson, Alan (International Conference on Management of Data, 2012)
In recent years, Massively Parallel Processors have increasingly been used to manage and query vast amounts of data. Dramatic performance improvements are achieved through distributed execution of queries across many nodes. Query optimization for such system is a challenging and important problem. In this paper we describe the Query Optimizer inside the SQL Server Parallel Data Warehouse product (PDW QO). We leverage existing QO technology in Microsoft SQL Server to implement a cost-based optimizer for distributed query execution. By properly abstracting metadata we can readily reuse existing logic for query simplification, space exploration and cardinality estimation. Unlike earlier approaches that simply parallelize the best serial plan, our optimizer considers a rich space of execution alternatives, and picks one based on a cost-model for the distributed execution environment. The result is a high-quality, effective query optimizer for distributed query processing in an MPP.