In this work, we present a semantic query optimization technique to improve the efficiency of the evaluation of a subset of SQL:1999 recursive queries.
Using datalog notation, we can state our main contribution as an algorithm that builds a program
′ equivalent to a given program
, when both are applied over a database
satisfying a set of functional dependencies. The input program
is a linear recursive datalog program. The new program
′ has less different variables and, sometimes, less atoms in rules, thus it is cheaper to evaluate. Using
′ is empirically shown to be more efficient than the original program.