Enhancing data warehouse performance through query caching
The main function of a data warehouse is the separation of the decision layer from the operation layer so that users can invoke analysis, planning, and decision support applications without having to worry about constantly evolving operational databases. Such applications allow ad hoc queries for which no predefined reports exist. It is possible that an ad hoc query is submitted by different users or even by the same user at different times, requiring its repeated evaluations even though the contents of the warehouse have not changed in between. In this work, we propose an enhancement to a data warehouse structure, by building additional intelligence in the form of an adaptive and efficient query cache. The cache contains a list of recently executed ad hoc queries and their answers. Whenever possible, a new query is satisfied by answers already stored in the cache, thereby avoiding potentially large data scans. We discuss issues related to organizing and searching the query cache. In particular, we outline subsumption detection algorithms for a number of different situations that allow for quick decision on whether the cache can be used to evaluate an arriving query.