Reorganizing Queries with Grouping
summary
An implementation of Quelg produces SQL via an IR with select and gselect primitives and a new reorganization algorithm that rewrites nested grouping to reduce query depth by roughly twofold and cut correlated subqueries. On PostgreSQL with 10,000-row tables translation time is negligible, overall runs improve ~10%, and two worst cases drop from >1s to ≈15ms. Microsoft LINQ either crashes or emits avalanche (Av) queries for several benchmarks.
AI-written summary · about
chapters (9)
- 0:00Intro
- 0:12Traditional Application with Database
- 1:27Implementing Language-integrated Query
- 2:21Grouping and Aggregation in SQL
- 4:46What's This Work?
- 6:48Reorganization (1/3)
- 8:48Example (1/2)
- 10:12Performance (2/2)
- 14:15Summary
related talks
49mScylla, Charybdis, and the mystery of Quill
16mA Compiler for Fused Relational Operations on Multisets
40mAccelerating QuestDB: Lessons from a 6x Performance Boost
15mSpeeding up Symbolic Reasoning for Relational Queries
16mExploring Query Optimization: How a few lines of code can save hours of time
50mImproving Postgres' Efficiency
42mTips on Schema, Queries, Parallel Access, and Reactive Programming
35mComprehending queries over finite maps
