skip to main content
article
Free access

Multiple-query optimization

Published: 01 March 1988 Publication History

Abstract

Some recently proposed extensions to relational database systems, as well as to deductive database systems, require support for multiple-query processing. For example, in a database system enhanced with inference capabilities, a simple query involving a rule with multiple definitions may expand to more than one actual query that has to be run over the database. It is an interesting problem then to come up with algorithms that process these queries together instead of one query at a time. The main motivation for performing such an interquery optimization lies in the fact that queries may share common data. We examine the problem of multiple-query optimization in this paper. The first major contribution of the paper is a systematic look at the problem, along with the presentation and analysis of algorithms that can be used for multiple-query optimization. The second contribution lies in the presentation of experimental results. Our results show that using multiple-query processing algorithms may reduce execution cost considerably.

References

[1]
ASTRAHAN, M. ET AL. System R: A relational approach to database management. ACM Trans. Database Syst. 1, 2 (June 1976), 97-137.
[2]
CHAKRAVARTH~, V. S., FISHMAN, D. H., AND MINKER, J. Semantic query optimization in expert systems and database systems. In Expert Database Systems: Proceedings From the 1st International Workshop, L. Kershberg, Ed. Benjamin/Cummings, Menlo Park, Calif. 1986, 659-674.
[3]
CHAKRAVARTHY, U. S., AND MINKER, J. Processing multiple queries in database systems. Database Eng. 5, 3 (Sept. 1982), 38-44.
[4]
CHAKRAVARTHY, U. S., AND MINKER, J. Multiple query processing in deductive databases. Tech. Rep. TR-1554, Dept. of Computer Science, Univ. of Maryland, College Park, Md., Aug. 1985.
[5]
CHAKRAVARTHY, U. S., MINKER, J., AND GRANT, J. Semantic query optimization: additional constraints and control strategies. In Proceedings of the 1st International Conference on Expert Database Systems (Charleston, S. C., April 1986). Institute of Information Management and Policy, Univ. of South Carolina, Apr. 1986, 259-270.
[6]
CLOCKSIN, W., AND MELLISH, C. Programming in PROLOG. Springer-Verlag, New York, 1981.
[7]
FINKELSTEIN, S. Common expression analysis in database applicaitons. In procdeeings of the ACM-SIGMOD International Conference on the Management of Data (Orlando, Fla., June 1982) ACM, New York, 1982, 235-245.
[8]
GALLAIRE, H., AND MINKER, J. Logic and Data Bases. Plenum Press, New York, 1978
[9]
GRANT, J., AND MINKER, J. On optimizing the evaluation of a set of expressions. Tech. Rep. TR-916, Univ. of Maryland, College Park, Md., July 1980.
[10]
GRANT, J., AND MINKER, J. Optimization in deductive and conventional relational database systems. In Advances in Data Base Theory, Vol. 1, H. Gallaire, J. Minker, and J.-M. Nicolas, Eds. Plenum Press, New York, 1981, 195-234.
[11]
GU2"rMAN, A. New features for relational database systems to support CAD applications. Ph.D. dissertation, Computer Science Div., Univ. of California, Berkeley, June 1984.
[12]
HALL, P. V. Common subexpression identification in general algebraic systems, Tech. Rep. UKSC 0060, IBM United Kingdom Scientific Centre, Nov. 1974.
[13]
HALL, P.V. Optimization of a single relational expression in a relational data base system. IBM J. Res. Dev. 20, 3 (May 1976), 244-257.
[14]
IOANNIDIS, Y. Processing recursion in deductive database systems. Ph.D. dissertation, Univ. of California, Berkeley, July 1986.
[15]
JARKE, S., CLIFFORD, J., AND VASSILIOU, Y. An optimizing PROLOG front-end to a relational query system. In Proceedings o/ACM-SIGMOD International Con/erence on the Management o/ Data (Boston, Mass., June 18-21, 1984). ACM, New York 1984, 296-306
[16]
JARKE, M. Common subexpression isolation in multiple query optimization. In Query Processing in Database Systems, W. Kim, D. Reiner, and D. Batory, Eds. Springer-Verlag, New York, 1984, 191-205.
[17]
KIM, W. Global optimization of relational queries: a first step. In Query Processing in Database Systems, W. Kim, D. Reiner, and D. Batory, Eds. Springer-Verlag, New York, 1984, 206-216.
[18]
KUNG, R., HANSON, E., IOANNIDIS, Y., SELLIS, T., SHAPIRO, L., AND STONEBRAKER, M. Heuristic search in data base systems. In Expert Database Systems: Proceedings From the 1st International Workshop, L. Kershberg, Ed. Benjamin/Cummings, Menlo Park, Calif., 1986, 537-548.
[19]
LARSON, P., AND YANG, H. Computing queries from derived relations. In Proceedings of International Conference on Very Large Data Bases (Stockholm, Aug. 1985), 259-269.
[20]
NAQVI, S., AND HENSCHEIN, L. On compiling queries in recursive first order datbases. J. ACM 31, 1 (Jan. 1984), 47-85.
[21]
NmSSON, N.J. Principles of Artificial Intelligence. Tioga, Palo Alto, Calif., 1980.
[22]
RELATIONAL TECHNOLOGY, INC. EQUEL/C User's Guide. Version 2.1, Relational Technology, Inc., Berkeley, Calif., July 1984.
[23]
ROSENKRANTZ, D. J., AND HUNT, H. B. Processing conjunctive predicates and queries. In Proceedings of the International Conference on Very Large Data Bases (Montreal, Oct. 1980), 64-72.
[24]
ROUSSOPOULOS, N. View indexing in relational databases. ACM Trans. Database Syst. 7, 2 (June 1982), 258-290.
[25]
I~OUSSOPOULOS, N. The logical access path schema of a database. IEEE "l'rans. Softw. Eng. SE-8, 6 (Nov. 1982), 563-573.
[26]
SELLZS, T., AND SHAPZRO, L. Optimization of extended database languages. In Proceedings of May 1985), ACM, New York, 1985, 424-436.
[27]
STONEBRAKER, M., AND ROWE, L. The design of POSTGRES. In Proceedings of the ACM- SIGMOD International Conference on the Management of Data (Washin~on D. C., May 28-30, 1986). ACM, New York, 1986, 340-355.
[28]
STONEBRAKER, M., WONG, E., KREPS, P., AND HELD, G. The design and implementation of INGRES. ACM Trans. Database Syst. 1, 3 (Sept. 1976), 189-222.
[29]
ULLMAN, J. Implementation of logical query languages for data bases. ACM Trans. Database Syst. 10, 3 (Sept. 1985), 289-321.
[30]
WONG, E., AND YOUSSEFI, K. Decomposition: A strategy for query processing. ACM Trans. Database Syst. 1, 3 (Sept. 1976), 223-241.
[31]
ZANIOLO, C. The database language GEM. In Proceedings of the ACM-SIGMOD International Conference on the Management of Data (San Jose, Calif., May, 1983). ACM, New York, 1983, 207-218.

Cited By

View all
  • (2024)A Runtime System for Interruptible Query Processing: When Incremental Computing Meets Fine-Grained ParallelismProceedings of the ACM on Programming Languages10.1145/36897728:OOPSLA2(1729-1756)Online publication date: 8-Oct-2024
  • (2024)Atom: An Efficient Query Serving System for Embedding-based Knowledge Graph Reasoning with Operator-level BatchingProceedings of the ACM on Management of Data10.1145/36771292:4(1-29)Online publication date: 30-Sep-2024
  • (2024)Quantum Data Management: From Theory to Opportunities2024 IEEE 40th International Conference on Data Engineering (ICDE)10.1109/ICDE60146.2024.00410(5376-5381)Online publication date: 13-May-2024
  • Show More Cited By

Recommendations

Reviews

Edward Sava-Segal

Given a set of queries that are supposed to share some tasks, a considerable reduction of execution time may be achieved by avoiding redundant page access. Sharing common temporary results among queries is cheaper than serial execution. This is the main reason for performing multiple-query analysis. The author's concern is building an optimal access plan, given a set of queries and a set of common subexpressions found previously. Two architectures for systems with a multiple-query processing facility are considered. One is based on a plan merger interleaving the results of the locally optimal access plans of each query. A second more sophisticated one is based on a global optimizer. In the second case the optimization problem is formulated as a state space search problem, and an admissible algorithm is used for that problem. Compared to previous work, a better estimation function is defined in this paper. It penalizes plans that cannot coexist in the final state, thus enabling the algorithm to converge to the final solution faster. Some restrictions are made in building the algorithm, but a way to avoid them using the same framework is discussed. An overview of previous research in the area is presented, and a full section describes experimental results, which the author claims to be publishing for the first time. Experiments proved the usefulness of the given algorithms in various contexts, producing a decrease of 20–50 percent in both I/O and CPU time, even in the presence of fast access paths for relations. Algorithms are clearly described and exemplified. No previous background, except some acquaintance with heuristic search algorithms, is needed to fully understand this interesting paper. Everyone concerned with building database and rule-based systems should read it.

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Database Systems
ACM Transactions on Database Systems  Volume 13, Issue 1
March 1988
128 pages
ISSN:0362-5915
EISSN:1557-4644
DOI:10.1145/42201
  • Editor:
  • Gio Wiederhold
Issue’s Table of Contents

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 March 1988
Published in TODS Volume 13, Issue 1

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)361
  • Downloads (Last 6 weeks)63
Reflects downloads up to 21 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2024)A Runtime System for Interruptible Query Processing: When Incremental Computing Meets Fine-Grained ParallelismProceedings of the ACM on Programming Languages10.1145/36897728:OOPSLA2(1729-1756)Online publication date: 8-Oct-2024
  • (2024)Atom: An Efficient Query Serving System for Embedding-based Knowledge Graph Reasoning with Operator-level BatchingProceedings of the ACM on Management of Data10.1145/36771292:4(1-29)Online publication date: 30-Sep-2024
  • (2024)Quantum Data Management: From Theory to Opportunities2024 IEEE 40th International Conference on Data Engineering (ICDE)10.1109/ICDE60146.2024.00410(5376-5381)Online publication date: 13-May-2024
  • (2024)Batch Hop-Constrained s-t Simple Path Query Processing in Large Graphs2024 IEEE 40th International Conference on Data Engineering (ICDE)10.1109/ICDE60146.2024.00201(2557-2569)Online publication date: 13-May-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
  • (2023)MITra: A Framework for Multi-Instance Graph TraversalProceedings of the VLDB Endowment10.14778/3603581.360359416:10(2551-2564)Online publication date: 1-Jun-2023
  • (2023)Collective Grounding: Applying Database Techniques to Grounding Templated ModelsProceedings of the VLDB Endowment10.14778/3594512.359451616:8(1843-1855)Online publication date: 1-Apr-2023
  • (2023)Workload-Aware Cache Management of Bitmap IndicesProceedings of the IEEE/ACM 10th International Conference on Big Data Computing, Applications and Technologies10.1145/3632366.3632386(1-10)Online publication date: 4-Dec-2023
  • (2023)Lemo: A Cache-Enhanced Learned Optimizer for Concurrent QueriesProceedings of the ACM on Management of Data10.1145/36267341:4(1-26)Online publication date: 12-Dec-2023
  • (2023)GEqO: ML-Accelerated Semantic Equivalence DetectionProceedings of the ACM on Management of Data10.1145/36267101:4(1-25)Online publication date: 12-Dec-2023
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media