Rule languages and internal algebras for rule-based optimizers

  • Authors:
  • Mitch Cherniack;Stanley B. Zdonik

  • Affiliations:
  • Department of Computer Science, Brown Umversity;Department of Computer Science, Brown Umversity

  • Venue:
  • SIGMOD '96 Proceedings of the 1996 ACM SIGMOD international conference on Management of data
  • Year:
  • 1996

Quantified Score

Hi-index 0.00

Visualization

Abstract

Rule-based optimizers and optimizer generators use rules to specify query transformations. Rules act directly on query representations, which typically are based on query algebras. But most algebras complicate rule formulation, and rules over these algebras must often resort to calling to externally defined bodies of code. Code makes rules difficult to formulate, prove correct and reason about, and therefore compromises the effectiveness of rule-based systems.In this paper we present KOLA: a combinator-based algebra designed to simplify rule formulation. KOLA is not a user language, and KOLA's variable-free queries are difficult for humans to read. But KOLA is an effective internal algebra because its combinator-style makes queries manipulable and structurally revealing. As a result, rules over KOLA queries are easily expressed without the need for supplemental code. We illustrate this point, first by showing some transformations that despite their simplicity, require head and body routines when expressed over algebras that include variables. We show that these transformations are expressible without supplemental routines in KOLA. We then show complex transformations of a class of nested queries expressed over KOLA. Nested query optimization, while having been studied before, have seriously challenged the rule-based paradigm.