Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/375663.375706acmconferencesArticle/Chapter ViewAbstractPublication PagesmodConference Proceedingsconference-collections
Article

Optimizing queries using materialized views: a practical, scalable solution

Published: 01 May 2001 Publication History

Abstract

Materialized views can provide massive improvements in query processing time, especially for aggregation queries over large tables. To realize this potential, the query optimizer must know how and when to exploit materialized views. This paper presents a fast and scalable algorithm for determining whether part or all of a query can be computed from materialized views and describes how it can be incorporated in transformation-based optimizers. The current version handles views composed of selections, joins and a final group-by. Optimization remains fully cost based, that is, a single “best” rewrite is not selected by heuristic rules but multiple rewrites are generated and the optimizer chooses the best alternative in the normal way. Experimental results based on an implementation in Microsoft SQL Server show outstanding performance and scalability. Optimization time increases slowly with the number of views but remains low even up to a thousand.

References

[1]
S. Agrawal, S. Chaudhuri, V. R. Narasayya: Automated Selection of Materialized Views and Indexes in SQL Databases. VLDB 2000: 496-505
[2]
R.G. Bello, K. Dias, J. Feenan, J. Finnerty, W.D. Norcott, H. Sun, A. Witkowski, M. Ziauddin, Materialized Views in Oracle, VLDB 1998, 659-664.
[3]
J. Chang and S. Lee, Query Reformulation Using Materialized Views in Data Warehousing Environment, First ACM Int'l Workshop on Data Warehousing and OLAP (DOLAP), 1998, 54-59.
[4]
S.Chaudhuri,S.Krishnamurthy,S.Potamianos,K.Shim,Optimizing Queries with Materialized Views, ICDE 1995, 190-200.
[5]
S. Cohen, W. Nutt, A. Serebrenik, Rewriting Aggregate Queries Using Views, PODS, 1999, 155-166.
[6]
G. Graefe, The Cascades Framework for Query Optimization, Data Engineering Bulletin, 18(3), 1995, 19-29.
[7]
G. Graefe and W. J. McKenna, The Volcano Optimizer Generator: Extensibility and Efficient Search, ICDE 1993, 209-218.
[8]
S. Grumbach, M. Rafanelli, L. Tininini, Querying Aggregate Data, PODS 1999, 174-184.
[9]
A. Gupta, V. Harinarayan, D. Quass, Aggregate Query Processing in Data WareHousing Environments, VLDB 1995, 358-369.
[10]
P.-A. Larson and H. Z. Yang, Computing Queries from Derived Relations, VLDB 1985, 259-269.
[11]
A.Levy,A.O.Mendelzon,Y.Sagiv,D.Srivastava,Answering Queries Using Views, PODS 1995, 95-104.
[12]
W. Nutt, Y. Sagiv, S. Shurin, Deciding Equivalence Among Aggregate Queries, PODS 1998, 214-223.
[13]
C.-S. Park, M. H. Kim and Y.-J. Lee, Rewriting OLAP Queries Using Materialized Views and Dimension Hierarchies in Data Warehouses, Korea Advanced Institute of Science and Technology, CS/TR-2000-156.
[14]
R. Pottinger, A. Levy, A Scalable Algorithm for Answering Queries Using Views, VLDB 2000, 484-495.
[15]
D.Srivastava,S.Dar,H.V.Jagadish,A.Levy,AnsweringQueries with Aggregation Using Views, VLDB 1996, 318-329.
[16]
W. P. Yan and P. -A. Larson, Eager Aggregation and Lazy Aggregation, VLDB 1995, 345-357.
[17]
H. Z. Yang and P. -A. Larson, Query Transformation for PSJ Queries, VLDB 1987, 245-254.
[18]
M. Zaharioudakis, R. Cochrane, G. Lapis, H. Pirahesh, M. Urata, Answering Complex SQL Queries Using Automatic Summary Tables, SIG- MOD 2000, 105-116

Cited By

View all
  • (2024)Sharing Queries with Nonequivalent User-defined Aggregate FunctionsACM Transactions on Database Systems10.1145/364913349:2(1-46)Online publication date: 10-Apr-2024
  • (2024)Workload Prediction for Edge ComputingProceedings of the 25th International Conference on Distributed Computing and Networking10.1145/3631461.3632522(286-291)Online publication date: 4-Jan-2024
  • (2024)Exploiting Shared Sub-Expression and Materialized View Reuse for Multi-Query OptimizationInformation Systems Frontiers10.1007/s10796-024-10506-wOnline publication date: 25-Jun-2024
  • Show More Cited By

Recommendations

Reviews

Evgueni V Ogouretchnikov

Materialized views are a very new area in the world of relational database management systems (RDBMS). They can provide massive improvements in query processing time, especially for aggregation queries over large tables. However, using materialized views efficiently in query optimizers can be difficult. The solution described in this paper is implemented in a production RDBMS, and is supported by experimental results that show outstanding performance and scalability. As the authors state, the main contributions of this paper are an efficient view-matching algorithm for views composed of selections, joins, and a final group-by (SPJG views); and a novel index structure that quickly narrows the search to a small set of candidate views on which view-matching is applied. The version of the algorithm described here is limited to SPJG views, and produces single-view substitutes. Section 2 describes the class of materialized views supported, and defines the problem to be solved. Section 3 describes the algorithm for deciding if a query expression can be computed from a view. Section 4 introduces lattice index structure. Section 5 presents experimental results based on a prototype implementation. Related work is discussed in section 6. Section 7 contains a summary and a brief discussion of possible extensions. This paper is scientifically and practically valuable, and is appropriate for researches and skillful database developers. However, understanding the paper requires deep knowledge of structured query language (SQL) optimization issues. Online Computing Reviews Service

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
SIGMOD '01: Proceedings of the 2001 ACM SIGMOD international conference on Management of data
May 2001
630 pages
ISBN:1581133324
DOI:10.1145/375663
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 May 2001

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. materialized views
  2. query optimization
  3. view matching

Qualifiers

  • Article

Conference

SIGMOD/PODS01
Sponsor:

Acceptance Rates

SIGMOD '01 Paper Acceptance Rate 44 of 293 submissions, 15%;
Overall Acceptance Rate 785 of 4,003 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)69
  • Downloads (Last 6 weeks)14
Reflects downloads up to 13 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Sharing Queries with Nonequivalent User-defined Aggregate FunctionsACM Transactions on Database Systems10.1145/364913349:2(1-46)Online publication date: 10-Apr-2024
  • (2024)Workload Prediction for Edge ComputingProceedings of the 25th International Conference on Distributed Computing and Networking10.1145/3631461.3632522(286-291)Online publication date: 4-Jan-2024
  • (2024)Exploiting Shared Sub-Expression and Materialized View Reuse for Multi-Query OptimizationInformation Systems Frontiers10.1007/s10796-024-10506-wOnline publication date: 25-Jun-2024
  • (2022)Datalog in WonderlandACM SIGMOD Record10.1145/3552490.355249251:2(6-17)Online publication date: 29-Jul-2022
  • (2022)Optimizing Recursive Queries with Progam SynthesisProceedings of the 2022 International Conference on Management of Data10.1145/3514221.3517827(79-93)Online publication date: 10-Jun-2022
  • (2022)Natural Stored and Inherited RelationsProcedia Computer Science10.1016/j.procs.2021.12.225198(171-178)Online publication date: 2022
  • (2022)View materialization using fuzzy MAX–MIN composition with association rule mining (VMFCA)Innovations in Systems and Software Engineering10.1007/s11334-022-00484-0Online publication date: 5-Oct-2022
  • (2022)Stored and Inherited Relations with PKN Foreign KeysNew Trends in Database and Information Systems10.1007/978-3-031-15743-1_45(487-499)Online publication date: 29-Aug-2022
  • (2021)A+ Indexes: Tunable and Space-Efficient Adjacency Lists in Graph Database Management Systems2021 IEEE 37th International Conference on Data Engineering (ICDE)10.1109/ICDE51399.2021.00130(1464-1475)Online publication date: Apr-2021
  • (2020)Age-Aware Query Evaluation for Big Data Analytics in Mobile Edge Clouds2020 IEEE 22nd International Conference on High Performance Computing and Communications; IEEE 18th International Conference on Smart City; IEEE 6th International Conference on Data Science and Systems (HPCC/SmartCity/DSS)10.1109/HPCC-SmartCity-DSS50907.2020.00027(214-222)Online publication date: Dec-2020
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media