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

skip to main content
10.1145/3448016.3452831acmconferencesArticle/Chapter ViewAbstractPublication PagesmodConference Proceedingsconference-collections
research-article

To Partition, or Not to Partition, That is the Join Question in a Real System

Published: 18 June 2021 Publication History

Abstract

An efficient implementation of a hash join has been a highly researched problem for decades. Recently, the radix join has been shown to have superior performance over the alternatives (e.g., the non-partitioned hash join), albeit on synthetic microbenchmarks. Therefore, it is unclear whether one can simply replace the hash join in an RDBMS or use the radix join as a performance booster for selected queries. If the latter, it is still unknown when one should rely on the radix join to improve performance.
In this paper, we address these questions, show how to integrate the radix join in Umbra, a code-generating DBMS, and make it competitive for selective queries by introducing a Bloom-filter based semi-join reducer. We have evaluated how well it runs when used in queries from more representative workloads like TPC-H. Surprisingly, the radix join brings a noticeable improvement in only one out of all 59 joins in TPC-H. Thus, with an extensive range of microbenchmarks, we have isolated the effects of the most important workload factors and synthesized the range of values where partitioning the data for the radix join pays off. Our analysis shows that the benefit of data partitioning quickly diminishes as soon as we deviate from the optimal parameters, and even late materialization rarely helps in real workloads. We thus, conclude that integrating the radix join within a code-generating database rarely justifies the increase in code and optimizer complexity and advise against it for processing real-world workloads.

Supplementary Material

MP4 File (3448016.3452831.mp4)
An efficient implementation of a hash join has been a highly researched problem for decades. Recently, the radix join has been shown to have superior performance than the alternatives (e.g., the non-partitioned hash join), albeit on synthetic microbenchmarks. So, it is not clear whether one can simply replace the hash join in an RDBMS or use the radix join as a performance booster for selected queries. If the latter, it is still unknown when one should rely on the radix join to improve the performance.In this paper, we address these questions, show how to integrate the radix join in a code-generating DBMS, and make it competitive for selective queries by introducing a bloom filter based semi-join reducer. We then evaluate how well it runs when used in queries from more representative workloads like TPC-H. Surprisingly, the radix join brings a noticeable improvement only in one out of all the 59 joins in TPC-H. Thus, with an extensive range of microbenchmarks, we isolate the effects of the most important workload factors and synthesize the range of values, where partitioning the data for the radix join pays off. Our analysis shows that the benefit of data partitioning quickly diminishes as soon as we deviate from the optimal parameters, and does not compensate for the added materialization overhead. We, thus, conclude that integrating the radix join within a database rarely justifies the increase in code and optimizer complexity and advise against it.

References

[1]
D. J. Abadi, D. S. Myers, D. J. DeWitt, and S. Madden. Materialization strategies in a column-oriented DBMS. In R. Chirkova, A. Dogac, M. T. Ö zsu, and T. K. Sellis, editors, Proceedings of the 23rd International Conference on Data Engineering, ICDE 2007, Istanbul, Turkey, pages 466--475. IEEE Computer Society, 2007.
[2]
M. Albutiu, A. Kemper, and T. Neumann. Massively parallel sort-merge joins in main memory multi-core database systems. PVLDB, 5(10):1064--1075, 2012.
[3]
C. Balkesen, G. Alonso, J. Teubner, and M. T. Ö zsu. Multi-core, main-memory joins: Sort vs. hash revisited. PVLDB, 7(1):85--96, 2013.
[4]
C. Balkesen, J. Teubner, G. Alonso, and M. T. Ö zsu. Main-memory hash joins on multi-core cpus: Tuning to the underlying hardware. In 29th IEEE International Conference on Data Engineering, ICDE 2013, Brisbane, Australia, April 8--12, 2013, pages 362--373, 2013.
[5]
C. Balkesen, J. Teubner, G. Alonso, and M. T. Ö zsu. Main-memory hash joins on modern processor architectures. IEEE Trans. Knowl. Data Eng., 27(7):1754--1766, 2015.
[6]
R. Barber, G. M. Lohman, I. Pandis, V. Raman, R. Sidle, G. K. Attaluri, N. Chainani, S. Lightstone, and D. Sharpe. Memory-efficient hash joins. Proc. VLDB Endow., 8(4):353--364, 2014.
[7]
S. Blanas, Y. Li, and J. M. Patel. Design and evaluation of main memory hash join algorithms for multi-core cpus. In Proceedings of the ACM SIGMOD International Conference on Management of Data, SIGMOD 2011, Athens, Greece, June 12--16, 2011, pages 37--48, 2011.
[8]
P. A. Boncz, A. G. Anadiotis, and S. Kl"a be. JCC-H: adding join crossing correlations with skew to TPC-H. In Performance Evaluation and Benchmarking for the Analytics Era - 9th TPC Technology Conference, TPCTC 2017, Munich, Germany, August 28, 2017, Revised Selected Papers, pages 103--119, 2017.
[9]
P. A. Boncz, S. Manegold, and M. L. Kersten. Database architecture optimized for the new bottleneck: Memory access. In VLDB'99, Proceedings of 25th International Conference on Very Large Data Bases, September 7--10, 1999, Edinburgh, Scotland, UK, pages 54--65, 1999.
[10]
P. A. Boncz, T. Neumann, and O. Erling. TPC-H analyzed: Hidden messages and lessons learned from an influential benchmark. In Performance Characterization and Benchmarking - 5th TPC Technology Conference, TPCTC 2013, Trento, Italy, August 26, 2013, Revised Selected Papers, pages 61--76, 2013.
[11]
M. Dreseler, M. Boissier, T. Rabl, and M. Uflacker. Quantifying TPC-H choke points and their optimizations. Proc. VLDB Endow., 13(8):1206--1220, 2020.
[12]
J. Fang, J. Lee, P. Hofstee, and J. Hidders. Analyzing in-memory hash joins: Granularity matters. In International Workshop on Accelerating Analytics and Data Management Systems Using Modern Processor and Storage Architectures, ADMS@VLDB 2017, Munich, Germany, September 1, 2017., pages 18--25, 2017.
[13]
M. Freitag and T. Neumann. Umbra: A disk-based system with in-memory performance. In CIDR, 2020.
[14]
K. Kara, J. Giceva, and G. Alonso. Fpga-based data partitioning. In Proceedings of the 2017 ACM International Conference on Management of Data, SIGMOD Conference 2017, Chicago, IL, USA, May 14--19, 2017, pages 433--445, 2017.
[15]
T. Kersten, V. Leis, and T. Neumann. Tidy Tuples and Flying Start: Fast Compilation and Fast Execution of Relational Queries in Umbra. VLDB J., 30, 2021.
[16]
O. Khattab, M. Hammoud, and O. Shekfeh. Polyhj: A polymorphic main-memory hash join paradigm for multi-core machines. In Proceedings of the 27th ACM International Conference on Information and Knowledge Management, CIKM 2018, Torino, Italy, October 22--26, 2018, pages 1323--1332, 2018.
[17]
C. Kim, E. Sedlar, J. Chhugani, T. Kaldewey, A. D. Nguyen, A. D. Blas, V. W. Lee, N. Satish, and P. Dubey. Sort vs. hash revisited: Fast join implementation on modern multi-core cpus. PVLDB, 2(2):1378--1389, 2009.
[18]
H. Lang, V. Leis, M. Albutiu, T. Neumann, and A. Kemper. Massively parallel numa-aware hash joins. In In Memory Data Management and Analysis - First and Second International Workshops, IMDM 2013, Riva del Garda, Italy, August 26, 2013, IMDM 2014, Hongzhou, China, September 1, 2014, Revised Selected Papers, pages 3--14, 2013.
[19]
H. Lang, T. Mü hlbauer, F. Funke, P. A. Boncz, T. Neumann, and A. Kemper. Data blocks: Hybrid OLTP and OLAP on compressed storage using both vectorization and compilation. In Proceedings of the 2016 International Conference on Management of Data, SIGMOD Conference 2016, San Francisco, CA, USA, June 26 - July 01, 2016, pages 311--326, 2016.
[20]
H. Lang, T. Neumann, A. Kemper, and P. A. Boncz. Performance-optimal filtering: Bloom overtakes cuckoo at high-throughput. PVLDB, 12(5):502--515, 2019.
[21]
V. Leis, P. A. Boncz, A. Kemper, and T. Neumann. Morsel-driven parallelism: a numa-aware query evaluation framework for the many-core age. In International Conference on Management of Data, SIGMOD 2014, Snowbird, UT, USA, June 22--27, 2014, pages 743--754, 2014.
[22]
V. Leis, A. Gubichev, A. Mirchev, P. A. Boncz, A. Kemper, and T. Neumann. How good are query optimizers, really? Proc. VLDB Endow., 9(3):204--215, 2015.
[23]
D. Makreshanski, G. Giannikis, G. Alonso, and D. Kossmann. Many-query join: efficient shared execution of relational joins on modern hardware. VLDB J., 27(5):669--692, 2018.
[24]
S. Manegold, P. A. Boncz, and M. L. Kersten. What happens during a join? dissecting CPU and memory optimization effects. In VLDB 2000, Proceedings of 26th International Conference on Very Large Data Bases, September 10--14, 2000, Cairo, Egypt, pages 339--350, 2000.
[25]
S. Manegold, P. A. Boncz, and M. L. Kersten. Optimizing main-memory join on modern hardware. IEEE Trans. Knowl. Data Eng., 14(4):709--730, 2002.
[26]
S. Manegold, P. A. Boncz, and N. Nes. Cache-conscious radix-decluster projections. In (e)Proceedings of the Thirtieth International Conference on Very Large Data Bases, VLDB 2004, Toronto, Canada, August 31 - September 3 2004, pages 684--695, 2004.
[27]
P. Menon, A. Pavlo, and T. C. Mowry. Relaxed operator fusion for in-memory databases: Making compilation, vectorization, and prefetching work together at last. Proc. VLDB Endow., 11(1):1--13, 2017.
[28]
G. Moerkotte and T. Neumann. Accelerating queries with group-by and join by groupjoin. PVLDB, 4(11):843--851, 2011.
[29]
T. Neumann. Engineering high-performance database engines. PVLDB, 7(13):1734--1741, 2014.
[30]
T. Neumann. Comparing join implementations. http://databasearchitects.blogspot.com/2016/04/comparing-join-implementations.html, Apr 2016.
[31]
T. Neumann and A. Kemper. Unnesting arbitrary queries. In BTW, Germany, pages 383--402, 2015.
[32]
T. Neumann and V. Leis. Compiling database queries into machine code. IEEE Data Eng. Bull., 37(1):3--11, 2014.
[33]
T. Neumann, V. Leis, and A. Kemper. The complete story of joins (in hyper). In BTW, Germany, pages 31--50, 2017.
[34]
H. Pirk, O. R. Moll, M. Zaharia, and S. Madden. Voodoo - A vector algebra for portable database performance on modern hardware. Proc. VLDB Endow., 9(14):1707--1718, 2016.
[35]
C. Pohl, K.-U. Sattler, and G. Graefe. Joins on high-bandwidth memory: a new level in the memory hierarchy. The VLDB Journal, 07 2019.
[36]
O. Polychroniou, A. Raghavan, and K. A. Ross. Rethinking SIMD vectorization for in-memory databases. In Proceedings of the 2015 ACM SIGMOD International Conference on Management of Data, Melbourne, Victoria, Australia, May 31 - June 4, 2015, pages 1493--1508, 2015.
[37]
O. Polychroniou and K. A. Ross. A comprehensive study of main-memory partitioning and its application to large-scale comparison- and radix-sort. In International Conference on Management of Data, SIGMOD 2014, Snowbird, UT, USA, June 22--27, 2014, pages 755--766, 2014.
[38]
S. Richter, V. Alvarez, and J. Dittrich. A seven-dimensional analysis of hashing methods and its implications on query processing. PVLDB, 9(3):96--107, 2015.
[39]
N. Satish, C. Kim, J. Chhugani, A. D. Nguyen, V. W. Lee, D. Kim, and P. Dubey. Fast sort on cpus and gpus: a case for bandwidth oblivious SIMD sort. In Proceedings of the ACM SIGMOD International Conference on Management of Data, SIGMOD 2010, Indianapolis, Indiana, USA, June 6--10, 2010, pages 351--362, 2010.
[40]
S. Schuh, X. Chen, and J. Dittrich. An experimental comparison of thirteen relational equi-joins in main memory. In Proceedings of the 2016 International Conference on Management of Data, SIGMOD Conference 2016, San Francisco, CA, USA, June 26 - July 01, 2016, pages 1961--1976, 2016.
[41]
F. M. Schuhknecht, P. Khanchandani, and J. Dittrich. On the surprising difficulty of simple things: the case of radix partitioning. PVLDB, 8(9):934--937, 2015.
[42]
A. Shatdal, C. Kant, and J. F. Naughton. Cache conscious algorithms for relational query processing. In VLDB'94, Proceedings of 20th International Conference on Very Large Data Bases, September 12--15, 1994, Santiago de Chile, Chile, pages 510--521, 1994.
[43]
L. Shrinivas, S. Bodagala, R. Varadarajan, A. Cary, V. Bharathan, and C. Bear. Materialization strategies in the vertica analytic database: Lessons learned. In C. S. Jensen, C. M. Jermaine, and X. Zhou, editors, 29th IEEE International Conference on Data Engineering, ICDE 2013, Brisbane, Australia, April 8--12, 2013, pages 1196--1207. IEEE Computer Society, 2013.
[44]
Transaction Processing Performance Council (TPC). TPC BENCHMARK$^™$ H (Decision Support) -- Standard Specification Revision 2.18.0. 1993--2018.
[45]
A. Vogelsgesang, M. Haubenschild, J. Finis, A. Kemper, V. Leis, T. Mü hlbauer, T. Neumann, and M. Then. Get real: How benchmarks fail to represent the real world. In Proceedings of the 7th International Workshop on Testing Database Systems, DBTest@SIGMOD 2018, Houston, TX, USA, June 15, 2018, pages 1:1--1:6, 2018.
[46]
J. Wassenberg and P. Sanders. Engineering a multi-core radix sort. In Euro-Par 2011 Parallel Processing - 17th International Conference, Euro-Par 2011, Bordeaux, France, August 29 - September 2, 2011, Proceedings, Part II, pages 160--169, 2011.
[47]
Z. Zhang, H. Deshmukh, and J. M. Patel. Data partitioning for in-memory systems: Myths, challenges, and opportunities. In CIDR, 2019.

Cited By

View all
  • (2025)Efficiently Processing Joins and Grouped Aggregations on GPUsProceedings of the ACM on Management of Data10.1145/37096893:1(1-27)Online publication date: 11-Feb-2025
  • (2025)Data Chunk Compaction in Vectorized ExecutionProceedings of the ACM on Management of Data10.1145/37096763:1(1-25)Online publication date: 11-Feb-2025
  • (2024)Performance Verification of IDL Architecture for Partitioned Database2024 36th Conference of Open Innovations Association (FRUCT)10.23919/FRUCT64283.2024.10749911(469-474)Online publication date: 30-Oct-2024
  • Show More Cited By

Index Terms

  1. To Partition, or Not to Partition, That is the Join Question in a Real System

      Recommendations

      Comments

      Please enable JavaScript to view thecomments powered by Disqus.

      Information & Contributors

      Information

      Published In

      cover image ACM Conferences
      SIGMOD '21: Proceedings of the 2021 International Conference on Management of Data
      June 2021
      2969 pages
      ISBN:9781450383431
      DOI:10.1145/3448016
      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 the author(s) 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: 18 June 2021

      Permissions

      Request permissions for this article.

      Check for updates

      Badges

      • Honorable Mention

      Author Tags

      1. in-memory databases
      2. join processing
      3. modern hardware
      4. partitioning
      5. performance evaluation

      Qualifiers

      • Research-article

      Funding Sources

      Conference

      SIGMOD/PODS '21
      Sponsor:

      Acceptance Rates

      Overall Acceptance Rate 785 of 4,003 submissions, 20%

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)160
      • Downloads (Last 6 weeks)22
      Reflects downloads up to 08 Mar 2025

      Other Metrics

      Citations

      Cited By

      View all
      • (2025)Efficiently Processing Joins and Grouped Aggregations on GPUsProceedings of the ACM on Management of Data10.1145/37096893:1(1-27)Online publication date: 11-Feb-2025
      • (2025)Data Chunk Compaction in Vectorized ExecutionProceedings of the ACM on Management of Data10.1145/37096763:1(1-25)Online publication date: 11-Feb-2025
      • (2024)Performance Verification of IDL Architecture for Partitioned Database2024 36th Conference of Open Innovations Association (FRUCT)10.23919/FRUCT64283.2024.10749911(469-474)Online publication date: 30-Oct-2024
      • (2024)A systematic review of deep learning applications in database query executionJournal of Big Data10.1186/s40537-024-01025-111:1Online publication date: 18-Dec-2024
      • (2024)SPID-Join: A Skew-resistant Processing-in-DIMM Join Algorithm Exploiting the Bank- and Rank-level Parallelisms of DIMMsProceedings of the ACM on Management of Data10.1145/36988272:6(1-27)Online publication date: 20-Dec-2024
      • (2024)High-Performance Query Processing with NVMe Arrays: Spilling without Killing PerformanceProceedings of the ACM on Management of Data10.1145/36988132:6(1-27)Online publication date: 20-Dec-2024
      • (2024)So Far and yet so Near - Accelerating Distributed Joins with CXLProceedings of the 20th International Workshop on Data Management on New Hardware10.1145/3662010.3663449(1-9)Online publication date: 10-Jun-2024
      • (2024)Simple, Efficient, and Robust Hash Tables for Join ProcessingProceedings of the 20th International Workshop on Data Management on New Hardware10.1145/3662010.3663442(1-9)Online publication date: 10-Jun-2024
      • (2024)Performance Testing of Intelligent Data Layer2024 IEEE 17th International Scientific Conference on Informatics (Informatics)10.1109/Informatics62280.2024.10900775(473-480)Online publication date: 13-Nov-2024
      • (2024)CPU and GPU Hash Joins on Skewed Data2024 IEEE 40th International Conference on Data Engineering Workshops (ICDEW)10.1109/ICDEW61823.2024.00064(402-408)Online publication date: 13-May-2024
      • Show More Cited By

      View Options

      Login options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Figures

      Tables

      Media

      Share

      Share

      Share this Publication link

      Share on social media