On the Complexity of Database Queries
01 June 1999
We revisit the issue of the complexity of database queries, in the light of the recent parametric refinement of complexity theory. We show that, if the query size (or the number of variables in the query) is considered as a parameter, the familiar query languages (conjunctive, positive, first order, Datalog) are classified at appropriate levels of the so-called W heirarchy of Downey and Fellows. These results strongly suggest that the query size is inherently in the exponent of the data complexity of any query evaluation algorithm, with the implication becoming stronger as the expressibility of the query language increases. On the positive side, we show that this exponential dependence can be avoided for the extension of acyclic queries with not equal (but not ) inequalities.