A New Factoring Algorithm for Magic Predicates

  • Authors:
  • Xiaoyong Du;Zhibin Liu;Naohiro Ishii

  • Affiliations:
  • -;-;-

  • Venue:
  • ASIAN '98 Proceedings of the 4th Asian Computing Science Conference on Advances in Computing Science
  • Year:
  • 1998

Quantified Score

Hi-index 0.00

Visualization

Abstract

The magic-sets method is a basic query optimization method in the deductive database systems. However, the original magic-sets method may generate large magic predicates for recursive queries. In this case, the evaluation of the magic predicates dominate the whole evaluation cost. Factorized magic sets can limit the sizes of generated magic predicates by splitting some magic predicates. However, it suffers from a new "over-splitting" problem. In this paper, we focus on a problem: what is the best splitting schema for a magic predicate, given a magic program. We propose a hypergraph model to represent the magic program as well as its naive evaluation procedure. An intuition is a magic predicate whose arguments belong to different connected components in infinite number of its generated graphs is considered to be a big one. It thus should be split. Based on the hypergraph model, we propose a new concept, called c-partition, as the best splitting of a magic predicate. Although we still do not know how to construct a c-partition, we define a serial of d[k]-partitions to approximate the c-partition. We prove that d[k]-partition is better then the existing splitting algorithm. Our method is a global splitting strategy for magic predicates, in the sense that it decides whether or not to split a magic predicate by considering the whole program.