【24h】

Cost-based optimization for magic

机译:基于成本的魔术优化

获取原文

摘要

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 reasonable manner. We have implemented this technique in IBM's DB2 C/S V2 database system. Our performance measurements demonstrate that the cost-based magic optimization technique performs well, and that without it, several poor decisions could be made.Our second contribution is a formal algebraic model of magic setsrewriting, based on an extension of the multiset relational algebra, which cleanly defines the search space and can be used in a rule-based optimizer. We introduce the multiset θ-semijoin operator, and derive equivalence rules involving this operator. We demonstrate that magic sets rewriting for non-recursive SQL queries can be modeled as a sequential composition of these equivalence rules.
机译:魔术集重写是众所周知的针对复杂决策支持查询的优化启发式方法。即使对于单个查询,此重写也可能有很多变体,它们的执行性能差异很大。我们提出了基于成本的技术来从多种选择中选择一种有效的变体。我们的第一个贡献是一种实用的方案,该模型将魔术集重写建模为一种特殊的联接方法,可以添加到任何基于成本的查询优化器中。我们推导了成本公式,使优化程序可以选择最佳的重写变体并确定是否有益。通过以合理的方式限制搜索空间,可以保留优化过程的复杂性顺序。我们已经在IBM的DB2 C / S V2数据库系统中实现了该技术。我们的性能测量结果表明,基于成本的魔术优化技术表现良好,没有它,可能会做出一些错误的决定。我们的第二个贡献是基于多集关系代数的扩展的形式化魔术集重写的正式代数模型。明确定义搜索空间,并且可以在基于规则的优化器中使用。我们引入多集θ-半联接算子,并导出涉及该算子的等价规则。我们证明了可以将非递归SQL查询的魔术集重写建模为这些等效规则的顺序组合。

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号