Tessera · join-aggregates on skewed sparse relations

Tessera in your browser

A join-aggregate counts, for every pair of values, the rows they share. Here the rows are the words of New York Times articles, and the query asks which words appear together. DuckDB and Tessera run the same SQL on the same rows, each on one thread of your browser, and return the same answer.

Articles

    
Loading the data and DuckDB-WASM…

DuckDB

Its own plan: a hash join that builds a row for every two words in an article, then a hash aggregation.

–

Waiting

Tessera

A sparse product that adds each article's pairs into counters and drops, before counting, the words that cannot qualify.

–

Waiting

Where the time goes

DuckDB's join emits a row for every two words that share an article, millions of rows here, and its aggregation updates a hash table for each of them. Tessera never builds these rows. It adds the pairs of each article into an array of counters and writes only the pairs that occur.

With a top 10 or a threshold, the engine can filter only after it has counted every pair. Tessera first bounds how often each word can appear in a pair and drops the words that cannot qualify, so a stricter query runs faster.

In this page both engines use one thread and no matrix accelerator. On a server, Tessera also uses every core and runs the most frequent words on the CPU's matrix accelerator, such as Intel AMX.

On a server, all 300,000 articles

QueryDuckDB v1.3.2TesseraGain
All pairs8.6 min2.9 s178×
The 1,000 most frequent pairs3.8 min0.89 s255×

SPALM, an in-database linear algebra system, takes 54.3 s for all pairs.

Citation

Gyuyeong Kim. Tessera: Fast Join-Aggregates over Skewed Sparse Relations in Database Engines. arXiv:2610.40620, 2026.

@misc{kim2026tessera,
  title={Tessera: Fast Join-Aggregates over Skewed Sparse Relations in Database Engines},
  author={Gyuyeong Kim},
  year={2026},
  eprint={2610.40620},
  archivePrefix={arXiv},
  primaryClass={cs.DB},
  url={https://arxiv.org/abs/2610.40620},
}