{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,5,6]],"date-time":"2026-05-06T06:26:31Z","timestamp":1778048791859,"version":"3.51.4"},"reference-count":58,"publisher":"Association for Computing Machinery (ACM)","issue":"4","license":[{"start":{"date-parts":[[2023,12,8]],"date-time":"2023-12-08T00:00:00Z","timestamp":1701993600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"funder":[{"DOI":"10.13039\/501100006374","name":"National Science Foundation","doi-asserted-by":"publisher","award":["IIS-2144547"],"award-info":[{"award-number":["IIS-2144547"]}],"id":[{"id":"10.13039\/501100006374","id-type":"DOI","asserted-by":"publisher"}]},{"name":"Meta Gift"},{"name":"Facebook Faculty Research Award"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Proc. ACM Manag. Data"],"published-print":{"date-parts":[[2023,12,8]]},"abstract":"<jats:p>Storage-based joins are still commonly used today because the memory budget does not always scale with the data size. One of the many join algorithms developed that has been widely deployed and proven to be efficient is the Hybrid Hash Join (HHJ), which is designed to exploit any available memory to maximize the data that is joined directly in memory. However, HHJ cannot fully exploit detailed knowledge of the join attribute correlation distribution.<\/jats:p>\n          <jats:p>In this paper, we show that given a correlation skew in the join attributes, HHJ partitions data in a suboptimal way. To do that, we derive the optimal partitioning using a new cost-based analysis of partitioning-based joins that is tailored for primary key - foreign key (PK-FK) joins, one of the most common join types. This optimal partitioning strategy has a high memory cost, thus, we further derive an approximate algorithm that has tunable memory cost and leads to near-optimal results. Our algorithm, termed NOCAP (Near-Optimal Correlation-Aware Partitioning) join, outperforms the state of the art for skewed correlations by up to 30%, and the textbook Grace Hash Join by up to 4\u00d7. Further, for a limited memory budget, NOCAP outperforms HHJ by up to 10%, even for uniform correlation. Overall, NOCAP dominates state-of-the-art algorithms and mimics the best algorithm for a memory budget varying from below \u221a||relation|| to more than ||relation||.<\/jats:p>","DOI":"10.1145\/3626739","type":"journal-article","created":{"date-parts":[[2023,12,12]],"date-time":"2023-12-12T14:01:21Z","timestamp":1702389681000},"page":"1-27","source":"Crossref","is-referenced-by-count":4,"title":["NOCAP: Near-Optimal Correlation-Aware Partitioning Joins"],"prefix":"10.1145","volume":"1","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-9197-4649","authenticated-orcid":false,"given":"Zichen","family":"Zhu","sequence":"first","affiliation":[{"name":"Boston University, Boston, MA, USA"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-7890-665X","authenticated-orcid":false,"given":"Xiao","family":"Hu","sequence":"additional","affiliation":[{"name":"University of Waterloo, Waterloo, ON, Canada"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-1837-0010","authenticated-orcid":false,"given":"Manos","family":"Athanassoulis","sequence":"additional","affiliation":[{"name":"Boston University, Boston, MA, USA"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2023,12,12]]},"reference":[{"key":"e_1_2_2_1_1","doi-asserted-by":"publisher","DOI":"10.14778\/2336664.2336678"},{"key":"e_1_2_2_2_1","doi-asserted-by":"publisher","DOI":"10.14778\/2733085.2733096"},{"key":"e_1_2_2_3_1","doi-asserted-by":"publisher","DOI":"10.14778\/2732219.2732227"},{"key":"e_1_2_2_4_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE.2013.6544839"},{"key":"e_1_2_2_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/3448016.3452831"},{"key":"e_1_2_2_6_1","doi-asserted-by":"publisher","DOI":"10.14778\/2735496.2735499"},{"key":"e_1_2_2_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/2594538.2594558"},{"key":"e_1_2_2_8_1","volume-title":"Deployment Archetypes for Cloud Applications. CoRR","author":"Berenberg Anna","year":"2021","unstructured":"Anna Berenberg and Brad Calder. 2021. Deployment Archetypes for Cloud Applications. CoRR, Vol. abs\/2105.0 (2021). https:\/\/arxiv.org\/abs\/2105.00560"},{"key":"e_1_2_2_9_1","doi-asserted-by":"publisher","DOI":"10.1145\/1989323.1989328"},{"key":"e_1_2_2_10_1","doi-asserted-by":"publisher","DOI":"10.1007\/978--3--319--72401-0_8"},{"key":"e_1_2_2_11_1","volume-title":"Proceedings of the International Conference on Very Large Data Bases (VLDB). 54--65","author":"Boncz Peter A.","year":"1999","unstructured":"Peter A. Boncz, Stefan Manegold, and Martin L. Kersten. 1999. Database architecture optimized for the new bottleneck: Memory access. In Proceedings of the International Conference on Very Large Data Bases (VLDB). 54--65. http:\/\/www.vldb.org\/conf\/1999\/P5.pdf"},{"key":"e_1_2_2_12_1","doi-asserted-by":"publisher","DOI":"10.1109\/ISIT.2006.261978"},{"key":"e_1_2_2_13_1","doi-asserted-by":"publisher","DOI":"10.1145\/3241737"},{"key":"e_1_2_2_14_1","doi-asserted-by":"publisher","DOI":"10.14778\/3485450.3485461"},{"key":"e_1_2_2_15_1","volume-title":"Cisco Global Cloud Index: Forecast and Methodology","year":"2016","unstructured":"Cisco. 2018. Cisco Global Cloud Index: Forecast and Methodology, 2016--2021. White Paper (2018). https:\/\/tinyurl.com\/CiscoGlobalCloud2018"},{"key":"e_1_2_2_16_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.is.2009.02.003"},{"key":"e_1_2_2_17_1","unstructured":"Bryce Cutt Ramon Lawrence and Tolley Joshua. 2008. Discussion and Implementation of Histojoin in PostgreSQL. (2008). https:\/\/www.postgresql.org\/message-id\/flat\/6EEA43D22289484890D119821101B1DF2C180E@exchange20.mercury.ad.ubc.ca"},{"key":"e_1_2_2_18_1","volume-title":"Proceedings of the ACM SIGMOD International Conference on Management of Data. 1--8. http:\/\/dl.acm.org\/citation.cfm?id=602259","author":"DeWitt David J.","unstructured":"David J. DeWitt, Randy H. Katz, Frank Olken, Leonard D. Shapiro, Michael Stonebraker, and David A. Wood. 1984. Implementation Techniques for Main Memory Database Systems. In Proceedings of the ACM SIGMOD International Conference on Management of Data. 1--8. http:\/\/dl.acm.org\/citation.cfm?id=602259.602261"},{"key":"e_1_2_2_19_1","doi-asserted-by":"publisher","DOI":"10.1145\/564691.564711"},{"key":"e_1_2_2_20_1","unstructured":"Edsger W. Dijkstra. 1986. The strange case of the pigeon-hole principle. (1986). https:\/\/www.cs.utexas.edu\/users\/EWD\/ewd09xx\/EWD980.PDF"},{"key":"e_1_2_2_21_1","unstructured":"Gartner. 2017. Gartner Says 8.4 Billion Connected \u201cThings\" Will Be in Use in 2017 Up 31 Percent From 2016. https:\/\/tinyurl.com\/Gartner2020."},{"key":"e_1_2_2_22_1","doi-asserted-by":"publisher","DOI":"10.1109\/HPCC\/SmartCity\/DSS.2019.00151"},{"key":"e_1_2_2_23_1","doi-asserted-by":"publisher","DOI":"10.1007\/s007780050043"},{"key":"e_1_2_2_24_1","doi-asserted-by":"publisher","DOI":"10.1109\/TCOMM.2020.3022692"},{"key":"e_1_2_2_25_1","volume-title":"Proceedings of the International Conference on Very Large Data Bases (VLDB). 525--535","author":"Hua Kien A","year":"1991","unstructured":"Kien A Hua and Chiang Lee. 1991. Handling Data Skew in Multiprocessor Database Computers Using Partition Tuning. In Proceedings of the International Conference on Very Large Data Bases (VLDB). 525--535. http:\/\/www.vldb.org\/conf\/1991\/P525.PDF"},{"key":"e_1_2_2_26_1","doi-asserted-by":"publisher","DOI":"10.14778\/3547305.3547327"},{"key":"e_1_2_2_27_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10922-014--9307--7"},{"key":"e_1_2_2_28_1","doi-asserted-by":"publisher","DOI":"10.1002\/spe.2799"},{"key":"e_1_2_2_29_1","volume-title":"Proceedings of the International Conference on Very Large Data Bases (VLDB). 257--266","author":"Kitsuregawa Masaru","year":"1989","unstructured":"Masaru Kitsuregawa, Masaya Nakayama, and Mikio Takagi. 1989. The Effect of Bucket Size Tuning in the Dynamic Hybrid GRACE Hash Join Method. In Proceedings of the International Conference on Very Large Data Bases (VLDB). 257--266. http:\/\/www.vldb.org\/conf\/1989\/P257.PDF"},{"key":"e_1_2_2_30_1","doi-asserted-by":"publisher","DOI":"10.1007\/BF03037022"},{"key":"e_1_2_2_31_1","doi-asserted-by":"publisher","DOI":"10.14778\/2850583.2850594"},{"key":"e_1_2_2_32_1","doi-asserted-by":"publisher","DOI":"10.1145\/3183713.3183728"},{"key":"e_1_2_2_33_1","doi-asserted-by":"publisher","DOI":"10.1145\/564691.564711"},{"key":"e_1_2_2_34_1","volume-title":"Forecasting the cost of processing multi-join queries via hashing for main-memory databases (Extended version). CoRR","author":"Liu Feilong","year":"2015","unstructured":"Feilong Liu and Spyros Blanas. 2015. Forecasting the cost of processing multi-join queries via hashing for main-memory databases (Extended version). CoRR, Vol. abs\/1507.0 (2015). http:\/\/arxiv.org\/abs\/1507.03049"},{"key":"e_1_2_2_35_1","doi-asserted-by":"publisher","DOI":"10.1145\/3318464.3389705"},{"key":"e_1_2_2_36_1","unstructured":"John C. McCallum. 2022. Historical Cost of Computer Memory and Storage. (2022). https:\/\/jcmit.net\/mem2015.htm"},{"key":"e_1_2_2_37_1","unstructured":"MySQL. 2021. MySQL System Variables. (2021). https:\/\/dev.mysql.com\/doc\/refman\/8.1\/en\/server-system-variables.html"},{"key":"e_1_2_2_38_1","volume-title":"https:\/\/www.mysql.com\/","author":"SQL.","year":"2023","unstructured":"MySQL. 2023. MySQL. (2023). https:\/\/www.mysql.com\/"},{"key":"e_1_2_2_39_1","volume-title":"Proceedings of the International Conference on Very Large Data Bases (VLDB). 468--478","author":"Nakayama Masaya","year":"1988","unstructured":"Masaya Nakayama, Masaru Kitsuregawa, and Mikio Takagi. 1988. Hash-Partitioned Join Method Using Dynamic Destaging Strategy. In Proceedings of the International Conference on Very Large Data Bases (VLDB). 468--478. http:\/\/www.vldb.org\/conf\/1988\/P468.PDF"},{"key":"e_1_2_2_40_1","doi-asserted-by":"publisher","DOI":"10.14778\/3368289.3368292"},{"key":"e_1_2_2_41_1","doi-asserted-by":"publisher","DOI":"10.1145\/3465998.3466003"},{"key":"e_1_2_2_42_1","volume-title":"Proceedings of the Biennial Conference on Innovative Data Systems Research (CIDR).","author":"Papon Tarikul Islam","year":"2021","unstructured":"Tarikul Islam Papon and Manos Athanassoulis. 2021b. The Need for a New I\/O Model. In Proceedings of the Biennial Conference on Innovative Data Systems Research (CIDR)."},{"key":"e_1_2_2_43_1","doi-asserted-by":"publisher","DOI":"10.1007\/s00778-019-00546-z"},{"key":"e_1_2_2_44_1","unstructured":"PostgreSQL. 2022. PostgreSQL Resource Consumption. (2022). https:\/\/www.postgresql.org\/docs\/13\/runtime-config-resource.html"},{"key":"e_1_2_2_45_1","unstructured":"PostgreSQL. 2023 a. PostgreSQL: The World's Most Advanced Open Source Relational Database. (2023). https:\/\/www.postgresql.org"},{"key":"e_1_2_2_46_1","unstructured":"PostgreSQL. 2023 b. Skew Optimization in PostgreSQL 16.0. (2023). https:\/\/github.com\/postgres\/postgres\/blob\/REL_16_0\/src\/include\/executor\/hashjoin.h#L121"},{"key":"e_1_2_2_47_1","volume-title":"Database Management Systems","author":"Ramakrishnan Raghu","unstructured":"Raghu Ramakrishnan and Johannes Gehrke. 2002. Database Management Systems. McGraw-Hill Higher Education, 3rd edition.","edition":"3"},{"key":"e_1_2_2_48_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE.2016.7498324"},{"key":"e_1_2_2_49_1","doi-asserted-by":"publisher","DOI":"10.1109\/BigData.2015.7364051"},{"key":"e_1_2_2_50_1","doi-asserted-by":"publisher","DOI":"10.1145\/2882903.2882917"},{"key":"e_1_2_2_51_1","doi-asserted-by":"publisher","DOI":"10.1145\/6314.6315"},{"key":"e_1_2_2_52_1","volume-title":"Proceedings of the International Conference on Very Large Data Bases (VLDB). 510--521","author":"Shatdal Ambuj","unstructured":"Ambuj Shatdal, Chander Kant, and Jeffrey F. Naughton. 1994. Cache Conscious Algorithms for Relational Query Processing. In Proceedings of the International Conference on Very Large Data Bases (VLDB). 510--521. http:\/\/dl.acm.org\/citation.cfm?id=645920.758363"},{"key":"e_1_2_2_53_1","unstructured":"TPC. 2021. TPC-H benchmark. (2021). http:\/\/www.tpc.org\/tpch\/"},{"key":"e_1_2_2_54_1","volume-title":"Proceedings of the International Conference on Very Large Data Bases (VLDB). 537--548","author":"Walton Christopher B","year":"1991","unstructured":"Christopher B Walton, Alfred G Dale, and Roy M Jenevein. 1991. A Taxonomy and Performance Model of Data Skew Effects in Parallel Joins. In Proceedings of the International Conference on Very Large Data Bases (VLDB). 537--548. http:\/\/www.vldb.org\/conf\/1991\/P537.PDF"},{"key":"e_1_2_2_55_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-23397-5_16"},{"key":"e_1_2_2_56_1","doi-asserted-by":"publisher","DOI":"10.1145\/1376616.1376720"},{"key":"e_1_2_2_57_1","volume-title":"Proceedings of the USENIX Symposium on Networked Systems Design and Implementation (NSDI). 15--28","author":"Zaharia Matei","year":"2012","unstructured":"Matei Zaharia, Mosharaf Chowdhury, Tathagata Das, Ankur Dave, Justin Ma, Murphy McCauly, Michael J Franklin, Scott Shenker, and Ion Stoica. 2012. Resilient Distributed Datasets: A Fault-Tolerant Abstraction for In-Memory Cluster Computing. In Proceedings of the USENIX Symposium on Networked Systems Design and Implementation (NSDI). 15--28. https:\/\/www.usenix.org\/conference\/nsdi12\/technical-sessions\/presentation\/zaharia"},{"key":"e_1_2_2_58_1","volume-title":"NOCAP: Near-Optimal Correlation-Aware Partitioning Joins. arxiv: 2310.03098 [cs.DB] https:\/\/aps.arxiv.org\/abs\/2310.03098","author":"Zhu Zichen","year":"2023","unstructured":"Zichen Zhu, Xiao Hu, and Manos Athanassoulis. 2023. NOCAP: Near-Optimal Correlation-Aware Partitioning Joins. arxiv: 2310.03098 [cs.DB] https:\/\/aps.arxiv.org\/abs\/2310.03098"}],"container-title":["Proceedings of the ACM on Management of Data"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3626739","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3626739","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,8,22]],"date-time":"2025-08-22T12:59:50Z","timestamp":1755867590000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3626739"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,12,8]]},"references-count":58,"journal-issue":{"issue":"4","published-print":{"date-parts":[[2023,12,8]]}},"alternative-id":["10.1145\/3626739"],"URL":"https:\/\/doi.org\/10.1145\/3626739","relation":{},"ISSN":["2836-6573"],"issn-type":[{"value":"2836-6573","type":"electronic"}],"subject":[],"published":{"date-parts":[[2023,12,8]]}}}