Distributed Datalog at Scale with Worst-Case Optimal Joins
Kunting Qi, Yihao Sun, Kristopher Micinski, Thomas Gilray, Sidharth Kumar
Abstract
Scalable logic-based analytics are frequently dominated by cyclic multi-way joins over large relational datasets. State-of-the-art systems evaluate these joins through chains of binary joins, incurring substantial overhead from large intermediate relations that must be materialized and redistributed across the network. Worst-Case Optimal Joins (WCOJ) offer a provably superior alternative by evaluating joins one variable at a time, eliminating intermediate blowup. However, existing WCOJ implementations target either shared-memory machines or one-shot, non-recursive queries on dataflow and big-data platforms, leaving WCOJ-based recursive evaluation on distributed-memory HPC systems an open problem. We present, to our knowledge, the first distributed-memory Datalog engine that uses WCOJ for recursive fixpoint evaluation. Our design builds on HyperCube partitioning, which hash-partitions relations along variable-aligned grid dimensions and replicates them along missing dimensions, and extends it from a single shuffle to iterative execution: in every semi-naive iteration, only newly derived tuples are repartitioned and re-replicated, using MPI all-to-all collectives and per-dimension all-gathers over subcube communicators, while the same layout is reused across iterations so that all WCOJ intersections remain rank-local. We evaluate our system on the Aurora and Polaris leadership-class supercomputers at Argonne National Laboratory using graph mining and program analysis benchmarks, demonstrating strong scalability, outperforming state-of-the-art Datalog engines on most benchmarks, and characterizing how partition dimensionality trades runtime against memory feasibility.
Create a lesson
Related papers
Optimal-Time Independent Subset Sampling over Acyclic Joins
Shared title terminology · Xuyang Liu, Zijian Zhang, Zhen Li
Probe-Based Routing for Join Optimizer Selection
Shared title terminology · Vladimir Burlakov, Alena Rybakina, Sergey Kudashev et al.
Join Order Enumeration and Optimization for Double-Star and Helix Join Graphs
Shared title terminology · Ansh Taneja, Ryan Marcus
Indexing Designs and Adaptive Data Distribution Optimization for In-Memory Databases on Hybrid DDR--CXL Memory
Shared title terminology · Huijie Cao, Shun Yang, Yinan Zhang et al.
The American Medical Directory Panel: Comparing AI-Assisted and LLM Transcription with Manual Data Entry at Scale
Shared title terminology · Christian M. Dahl, Sophie Li, Rasmus Emil Nyholm et al.
Tight Width Minimisation of Self-Join-Free Quantified Conjunctive Queries
Shared title terminology · Hubie Chen, Fabio Mogavero, Sam M. Thompson