Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/2213836.2213966acmconferencesArticle/Chapter ViewAbstractPublication PagesmodConference Proceedingsconference-collections
research-article

Adaptive optimizations of recursive queries in teradata

Published: 20 May 2012 Publication History

Abstract

Recursive queries were introduced as part of ANSI SQL 99 to support processing of hierarchical data typical of air flight schedules, bill-of-materials, data cube dimension hierarchies, and ancestor-descendant information (e.g. XML data stored in relations). Recently, recursive queries have also found extensive use in web data analysis such as social network and click stream data. Teradata implemented recursive queries in V2R6 using static plans whereby a query is executed in multiple iterations, each iteration corresponding to one level of the recursion. Such a static planning strategy may not be optimal since the demographics of intermediate results from recursive iterations often vary to a great extent. Gathering feedback at each iteration could address this problem by providing size estimates to the optimizer which, in turn, can produce an execution plan for the next iteration. However, such a full feedback scheme suffers from lack of pipelining and the inability to exploit global optimizations across the different recursion iterations. In this paper, we propose adaptive optimization techniques that avoid the issues with static as well as full feedback optimization approaches. Our approach employs a mix of multi-iteration pre-planning and dynamic feedback techniques which are generally applicable to any recursive query implementation in an RDBMS. We also validated the effectiveness of our proposed techniques by conducting experiments on a prototype implementation using a real-life social network data from the FriendFeed online blogging service.

References

[1]
S. Babu, P. Bizarro, and D. DeWitt, "Proactive re-optimization", in Proceedings of the 2005 ACM SIGMOD international conference on Management of data, SIGMOD '05, 2005, pp. 107--118.
[2]
M. Broecheler, A. Pugliese, and V. Subrahmanian, "Cosi: Cloud oriented subgraph identification in massive social networks", in Proceedings of 2010 International Conference on Advances in Social Networks Analysis and Mining, 2010.
[3]
D. Bruening, T. Garnett, and S. Amarasinghe, "An infrastructure for adaptive dynamic optimization", in Proceedings of the international symposium on Code generation and optimization: feedback directed and runtime optimization, CGO '03, 2003, pp. 265--275.
[4]
F. Celli, F. M. L. Di Lascio, M. Magnani, B. Pacelli, and L. Rossi. Social network data and practices: the case of FriendFeed. In International Conference on Social Computing, Behavioral Modeling and Prediction, Lecture Notes in Computer Science. Springer, Berlin, 2010.
[5]
C. M. Chen and N. Roussopoulos, "Adaptive selectivity estimation using query feedback", in Proceedings of the 1994 ACM SIGMOD international conference on Management of data, SIGMOD '94, 1994, pp. 161--172.
[6]
E. Cohen, "Size-estimation framework with applications to transitive closure and reachability", J. Comput. Syst. Sci., vol. 55, pp. 441--453, December 1997.
[7]
N. N. Dalvi, S. K. Sanghai, P. Roy, and S. Sudarshan, "Pipelining in multi-query optimization", in Proceedings of the twentieth ACM SIGMOD symposium on Principles of database systems, PODS '01., 2001, pp. 59--70.
[8]
M. A. Derr, "Adaptive query optimization in a deductive database system", in Proceedings of the second international conference on Information and knowledge management, CIKM '93, 1993, pp. 206--215.
[9]
E. Friedman, P. Pawlowski, and J. Cieslewicz, "SQL/MapReduce: A practical approach to self-describing", polymorphic, and parallelizable user-defined functions, Proc. VLDB Endow., vol. 2, pp. 1402--1413, August 2009.
[10]
A. Ghazal, D. Seid, A. Crolotte, "Recursive SQL Query Optimization with k-Iteration Lookahead", Dexa2006, Krakow, Poland, September 2006.
[11]
A. Gubichev, S. Bedathur, S. Seufert, and G. Weikum, "Fast and accurate estimation of shortest paths in large graphs", in Proceedings of the 19th ACM international conference on Information and knowledge management, CIKM '10, 2010, pp. 499--508.
[12]
FriendFeed, http://friendfeed.com/.
[13]
IBM Corporation, "Database Reference Information for DB2 Version 9.7 for Linux", UNIX, and Windows, 2011.
[14]
Y. E. Ioannidis and S. Christodoulakis, "Optimal histograms for limiting worst-case error propagation in the size of join results", ACM Trans. Database Syst., vol. 18, pp. 709--748, December 1993.
[15]
R. Jin, Y. Xiang, N. Ruan, and H. Wang, "Efficiently answering reachability queries on very large directed graphs", in Proceedings of the 2008 ACM SIGMOD international conference on Management of data, SIGMOD '08, 2008, pp. 595--608.
[16]
R. Jin, Y. Xiang, N. Ruan, and D. Fuhry, "3-HOP: A high compression indexing scheme for reachability query", in Proceedings of the 35th SIGMOD international conference on Management of data, SIGMOD '09, 2009, pp. 813--826.
[17]
N. Kabra and D. J. DeWitt, "Efficient mid-query re-optimization of sub-optimal query execution plans", in Proceedings of the 1998 ACM SIGMOD international conference on Management of data, SIGMOD '98, 1998, pp. 106--117.
[18]
U. Kang, C. E. Tsourakakis, A. P. Appel, C. Faloutsos, and J. Leskovec, "HADI: Mining radii of large graphs", ACM Transactions on Knowledge Discovery from Data, vol. 5, February 2011.
[19]
R. J. Lipton and J. F. Naughton, "Estimating the size of generalized transitive closures", in Proceedings of the 15th international conference on Very large data bases, VLDB '89, 1989, pp. 165--171.
[20]
R. J. Lipton and J. F. Naughton, "Query size estimation by adaptive sampling", in Selected papers of the 9th annual ACM SIGACT-SIGMOD-SIGART symposium on Principles of database systems, 1995, pp. 18--25.
[21]
V. Markl, V. Raman, D. Simmen, G. Lohman, H. Pirahesh, and M. Cilimdzic, "Robust query processing through progressive optimization", in Proceedings of the 2004 ACM SIGMOD international conference on Management of data, SIGMOD '04, 2004, pp. 659--670.
[22]
Mircosoft Corp. "Microsoft SQL Server 2008 R2 Technical Reference (Database Engine)", MSDN Library, 2008.
[23]
Oracle® Database SQL Language Reference 11g Release 1 (11.1). Oracle Corp., Redwood City, CA. August 2010.
[24]
C. Ordonez, "Optimizing recursive queries in SQL", in Proceedings of the 2005 ACM SIGMOD international conference on Management of data, SIGMOD '05, 2005, pp. 834--839.
[25]
P. Roy, S. Seshadri, S. Sudarshan, and S. Bhobe, "Efficient and extensible algorithms for multi query optimization", in Proceedings of the 2000 ACM SIGMOD international conference on Management of data, SIGMOD '00, 2000, pp. 249--260.
[26]
T. K. Sellis, "Multiple-query optimization", ACM Trans. Database Syst., vol. 13, pp. 23--52, March 1988.
[27]
SQL3. 1999. ISO/IEC 9075: 1999, Information Technology-Database Languages-SQL.
[28]
Teradata Corp. "Teradata Database SQL Fundamentals", Release 13.10. August 2010.
[29]
Teradata/NCR. "Introduction to the Teradata Warehouse", Release V2R6.2, B035--1091-096A, September 2006.
[30]
S. Trissl and U. Leser, "Fast and practical indexing and querying of very large graphs", in Proceedings of the 2007 ACM SIGMOD international conference on Management of data, SIGMOD '07, 2007, pp. 845--856.
[31]
F. Wei, "TEDI: Efficient shortest path query answering on graphs", in Proceedings of the 2010 international conference on Management of data, SIGMOD '10, 2010, pp. 99--110.
[32]
Wikimedia Foundation, Inc. "FriendFeed." Wikipedia: The Free Encyclopedia. 7 February 2012. Web. 11 March 2012.
[33]
C. Zaniolo, S. Ceri, C. Faloutsos, R. T. Snodgrass, V. S. Subrahmanian, and R. Zicari, Advanced database systems,. San Francisco, CA, USA: Morgan Kaufmann Publishers Inc., 1997.
[34]
Z. Zhao, M. Khan, V. Kumar, and M. Marathe, "Subgraph enumeration in large social contact networks using parallel color coding and streaming", in 39th International Conference on Parallel Processing, ICPP 10, 2010, pp. 594--603.
[35]
P. Zhao and J. Han, "On graph query optimization in large networks", Proc. VLDB Endow., vol. 3, pp. 340--351, September 2010.
[36]
L. Zou, L. Chen, and M. T. Özsu, "Distance-join: pattern match query in a large graph database", Proc. VLDB Endow., vol. 2, 886--897, August 2009.
[37]
T. Zurek and P. Thanisch, "Optimization strategies for parallel linear recursive query processing", Technical Report ECS-CSG-16-95, Dept. of Computer Science, Edinburgh University, 1995.

Cited By

View all
  • (2023)Finding a Second Wind: Speeding Up Graph Traversal Queries in RDBMSs Using Column-Oriented ProcessingModel and Data Engineering10.1007/978-3-031-49333-1_14(186-199)Online publication date: 22-Dec-2023
  • (2021)DBSpinner: Making a Case for Iterative Processing in Databases2021 IEEE 37th International Conference on Data Engineering (ICDE)10.1109/ICDE51399.2021.00273(2399-2410)Online publication date: Apr-2021
  • (2018)SQLoop: High Performance Iterative Processing in Data Management2018 IEEE 38th International Conference on Distributed Computing Systems (ICDCS)10.1109/ICDCS.2018.00104(1039-1051)Online publication date: Jul-2018
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
SIGMOD '12: Proceedings of the 2012 ACM SIGMOD International Conference on Management of Data
May 2012
886 pages
ISBN:9781450312479
DOI:10.1145/2213836
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: 20 May 2012

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. database
  2. optimization
  3. recursion
  4. sampling

Qualifiers

  • Research-article

Conference

SIGMOD/PODS '12
Sponsor:

Acceptance Rates

SIGMOD '12 Paper Acceptance Rate 48 of 289 submissions, 17%;
Overall Acceptance Rate 785 of 4,003 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)18
  • Downloads (Last 6 weeks)1
Reflects downloads up to 09 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2023)Finding a Second Wind: Speeding Up Graph Traversal Queries in RDBMSs Using Column-Oriented ProcessingModel and Data Engineering10.1007/978-3-031-49333-1_14(186-199)Online publication date: 22-Dec-2023
  • (2021)DBSpinner: Making a Case for Iterative Processing in Databases2021 IEEE 37th International Conference on Data Engineering (ICDE)10.1109/ICDE51399.2021.00273(2399-2410)Online publication date: Apr-2021
  • (2018)SQLoop: High Performance Iterative Processing in Data Management2018 IEEE 38th International Conference on Distributed Computing Systems (ICDCS)10.1109/ICDCS.2018.00104(1039-1051)Online publication date: Jul-2018
  • (2017)All-in-OneProceedings of the 2017 ACM International Conference on Management of Data10.1145/3035918.3035943(1165-1180)Online publication date: 9-May-2017
  • (2015)Robust Query Optimization Methods With Respect to Estimation ErrorsACM SIGMOD Record10.1145/2854006.285401244:3(25-36)Online publication date: 3-Dec-2015
  • (2015)Efficient Parallel Processing of Distance Join Queries Over Distributed GraphsIEEE Transactions on Knowledge and Data Engineering10.1109/TKDE.2014.234538327:3(740-754)Online publication date: 1-Mar-2015
  • (2014)XDB - A Novel Database Architecture for Data Analytics as a ServiceProceedings of the 2014 IEEE International Congress on Big Data10.1109/BigData.Congress.2014.23(96-103)Online publication date: 27-Jun-2014

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