Tessera: Fast Join-Aggregates over Skewed Sparse Relations in Database Engines
Gyuyeong Kim
Abstract
Join-aggregate queries count or sum matching rows for each pair of values, often over skewed sparse relations in which a few values are frequent and most pairs of values never co-occur. Conventional execution plans materialize billions of intermediate join rows, taking minutes to tens of minutes per query. Recent matrix-based solutions reformulate these queries as matrix multiplication to reduce or avoid this materialization. However, they remain slow because they either store result cells for non-matching pairs or still materialize intermediate join rows for infrequent values. We present Tessera, a skew-aware join-aggregate operator for database engines that avoids both sources of overhead. Specifically, Tessera computes a sparse matrix product directly over the engine's rows, emits only nonzero cells as result rows, and prunes values that cannot meet the query's threshold before multiplication begins. It also offloads the dense block formed by pairs of the most frequent values to a CPU matrix accelerator when that block is dense enough. Experimental results show that Tessera is faster than the fastest existing system by 2.8x to 18.8x. In addition, Tessera outperforms DuckDB's execution plans by up to 1,802x.
Create a lesson
Related papers
[Experiment, Analysis, and Benchmark] How well do LLMs comprehend and design relational database schemata?
Shared title terminology · Sriom Chakrabarti, Sean Bin Yang, Arijit Khan et al.
Agents Propose, Code Verifies, Humans Decide: Verified Agentic Ingestion of Heterogeneous Scientific Tables into Relational Databases
Shared title terminology · Bharatha Rankothge, Suzanne Hodgkins, Virginia Rich et al.
Stop Handcrafting Your Engine! GenDB-V: Towards AI-Generated and Formally Verified Database Systems
Shared title terminology · Jiale Lao, Immanuel Trummer
Mixed-Type Relational Database Synthesis with Graph-Prompted Language Model
Shared title terminology · Yuxiang Sun, Mengshi Chen, Jianwei Wang et al.
NovaFilter - A Rule-Based ETL Staging Framework for Fault-Tolerant Relational Databases
Shared title terminology · Meike Klettke
NousDB - A Fast Query Engine for Semantic Analytics
Shared title terminology · Christos Tsapelas, Georgia Koutrika, Yannis Ioannidis