---
title: Worst-case optimal join algorithm
slug: worst-case-optimal-join-algorithm
qid: 
snapshot: enwiki-001314136590
content_hash: 
license: CC BY-SA 4.0
source: https://en.wikipedia.org/w/index.php?oldid=1314136590
tags: [23603337, 26220375, 90877290]
---

# Worst-case optimal join algorithm

> [!note] Provenance
> Snapshot `enwiki-001314136590` · content root `…`
> Derived from <https://en.wikipedia.org/w/index.php?oldid=1314136590> · Licensed CC BY-SA 4.0

operate over two relations at a time, and join them on all attributes in the join condition; worst-case optimal algorithms such as generic join operate on a single attribute at a time but join all the relations on this attribute. A worst-case optimal join algorithm is an algorithm for computing relational joins with a runtime that is bounded by the worst-case output size of the join. Traditional binary join algorithms such as hash join operate over two relations at a time; joins between more than two relations are implemented by repeatedly applying binary joins. Worst-case optimal join algorithms are asymptotically faster in worst case than any join algorithm based on such iterated binary joins. The first worst-case optimal join algorithm, generic join, was published in 2012. Worst-case optimal join algorithms have been implemented in commercial database systems, including the LogicBlox system. Worst-case optimal joins have been applied to build a worst-case optimal algorithm for e-matching.

operate over two relations at a time, and join them on all attributes in the join condition; worst-case optimal algorithms such as generic join operate on a single attribute at a time but join all the relations on this attribute. A worst-case optimal join algorithm is an algorithm for computing relational joins with a runtime that is bounded by the worst-case output size of the join. Traditional binary join algorithms such as hash join operate over two relations at a time; joins between more than two relations are implemented by repeatedly applying binary joins. Worst-case optimal join algorithms are asymptotically faster in worst case than any join algorithm based on such iterated binary joins. The first worst-case optimal join algorithm, generic join, was published in 2012. Worst-case optimal join algorithms have been implemented in commercial database systems, including the LogicBlox system. Worst-case optimal joins have been applied to build a worst-case optimal algorithm for e-matching.
