Journal article

Cost-Based Optimization for Magic: Algebra and Implementation

P Seshadri, R Ramakrishnan, JM Hellerstein, D Srivastava, H Pirahesh, PJ Stuckey, TYC Leung, S Sudarshan

SIGMOD Record ACM Special Interest Group on Management of Data | Published : 1996

Abstract

Magic sets rewriting is a well-known optimization heuristic for complex decision-support queries. There can be many variants of this rewriting even for a single query, which differ greatly in execution performance. We propose cost-based techniques for selecting an efficient variant from the many choices. Our first contribution is a practical scheme that models magic sets rewriting as a special join method that can be added to any cost-based query optimizer. We derive cost formulas that allow an optimizer to choose the best variant of the rewriting and to decide whether it is beneficial. The order of complexity of the optimization process is preserved by limiting the search space in a reasona..

View full abstract

University of Melbourne Researchers