On conjunctive queries containing inequalities
Journal of the ACM (JACM)
Optimization of real conjunctive queries
PODS '93 Proceedings of the twelfth ACM SIGACT-SIGMOD-SIGART symposium on Principles of database systems
Answering queries using views (extended abstract)
PODS '95 Proceedings of the fourteenth ACM SIGACT-SIGMOD-SIGART symposium on Principles of database systems
Implementing data cubes efficiently
SIGMOD '96 Proceedings of the 1996 ACM SIGMOD international conference on Management of data
Deciding equivalences among aggregate queries
PODS '98 Proceedings of the seventeenth ACM SIGACT-SIGMOD-SIGART symposium on Principles of database systems
Rewriting aggregate queries using views
PODS '99 Proceedings of the eighteenth ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems
Principles of Database and Knowledge-Base Systems: Volume II: The New Technologies
Principles of Database and Knowledge-Base Systems: Volume II: The New Technologies
Aggregate-Query Processing in Data Warehousing Environments
VLDB '95 Proceedings of the 21th International Conference on Very Large Data Bases
Querying Heterogeneous Information Sources Using Source Descriptions
VLDB '96 Proceedings of the 22th International Conference on Very Large Data Bases
Answering Queries with Aggregation Using Views
VLDB '96 Proceedings of the 22th International Conference on Very Large Data Bases
Containment of Aggregate Queries
ICDT '03 Proceedings of the 9th International Conference on Database Theory
Selecting and using views to compute aggregate queries
Journal of Computer and System Sciences
Selecting and using views to compute aggregate queries
ICDT'05 Proceedings of the 10th international conference on Database Theory
Dyna: extending datalog for modern AI
Datalog'10 Proceedings of the First international conference on Datalog Reloaded
Hi-index | 0.02 |
Queries involving aggregation are typical in database applications. One of the main ideas to optimize the execution of an aggregate query is to reuse results of previously answered queries. This leads to the problem of rewriting aggregate queries using views. Due to a lack of theory, algorithms for this problem were rather ad-hoc. They were sound, but were not proven to be complete. Recently we have given syntactic characterizations for the equivalence of aggregate queries and applied them to decide when there exist rewritings. However, these decision procedures do not lend themselves immediately to an implementation. In this paper, we present practical algorithms for rewriting queries with count and sum. Our algorithms are sound. They are also complete for important cases. Our techniques can be used to improve well-known procedures for rewriting non-aggregate queries. These procedures can then be adapted to obtain algorithms for rewriting queries with min and max. The algorithms presented are a basis for realizing optimizers that rewrite queries using views.