Multi-query Optimization

Autor: Sundararajarao Sudarshan, Prasan Roy
Rok vydání: 2017
Předmět:
Zdroj: Encyclopedia of Database Systems ISBN: 9781489979933
Encyclopedia of Database Systems (2nd ed.)
DOI: 10.1007/978-1-4899-7993-3_239-2
Popis: Complex queries are becoming commonplace with the growing use of decision support systems. These complex queries often have a lot of common sub-expressions, either within a single query, or across multiple such queries. The focus of this work is to speed up query execution by exploiting these common subexpressions. Given a set of queries in a batch, multi-query optimization aims at exploiting common subexpressions among these queries to reduce evaluation cost. Multi-query optimization has hitherto been viewed as impractical, since earlier algorithms were exhaustive, and explore a doubly exponential search space. We present novel heuristics for multi-query optimization, and demonstrate that optimization using these heuristics provides significant benefits over traditional optimization, at a very acceptable overhead in optimization time. In online environments, where the queries are posed as a part of an ongoing stream instead of in a batch, individual query response times can be greatly improved by caching final/intermediate results of previous queries, and using them to answer later queries. An automatic caching system that makes intelligent decisions on what results to cache would be an important step towards knobs-free operation of a database system. We describe an automatic query caching system called Exchequer which is closely coupled with the optimizer to ensure that the caching system and the optimizer make mutually consistent decisions, and experimentally illustrate the benefits of this approach. Further, because the presence of views enhances query performance, materialized views are increasingly being supported by commercial database/data warehouse systems. Whenever the data warehouse is updated, the materialized views must also be updated. We show how to find an efficient plan for maintenance of a set of views, by exploiting common subexpressions between different view maintenance expressions. These common subexpressions may be materialized temporarily during view maintenance. Our algorithms also choose additional subexpressions/indices to be materialized permanently (and maintained along with other materialized views), to speed up view maintenance. In addition to faster view maintenance, our algorithms can also be used to efficiently select materialized views to speed up query workloads.
Databáze: OpenAIRE