Skip to Main Content
This paper presents a technique for the optimization of bound queries on disjunctive deductive databases. The optimization is based on the rewriting of the source program into an equivalent program which can be evaluated more efficiently. The proposed optimization reduces the amount of data needed to answer the query and, consequently, 1) reduces the complexity of computing a single model and, more importantly, 2) greatly reduces the number of models to be considered. Although, in this paper, we consider the application of the magic-set method, other rewriting techniques defined for special classes of queries can also be applied. To show the relevance of our technique, we have implemented a prototype of an optimizer. Several experiments have confirmed the value of the technique.