Joins Are Not Expensive
7 hours ago
- #Database Performance
- #SQL Joins
- #Data Modeling
- Challenges the misconception that joins are expensive compared to pre-joined One Big Table (OBT) models.
- Tests CPU performance using DuckDB (columnar) and PostgreSQL (row-based) on dimensional vs. OBT models.
- Finds that dimensional models with joins are often more efficient, especially as retrieved column count increases.
- Highlights that OBT models show non-linear CPU cost growth with more columns, while joins scale more linearly.
- Notes that even for row stores, dimensional models can outperform OBT in many scenarios.
- References Kimball's dimensional modeling principles, supporting the efficiency of joins over denormalization.
- Concludes that joins are not expensive relative to alternatives, and OBT designs may be inferior in many cases.