Execution for Database Management Systemss
Query execution is the stage where a DBMS runs a chosen plan by pipelining operators such as scan, filter, join, sort and aggregate. Common processing models are the iterator or Volcano model, materialisation and vectorised batches. Operators like hash join and sort-merge join are implemented here, with attention to memory limits and parallelism.
Stage: Query Processing · Part of the Database Management Systems roadmap · Last reviewed 19 November 2026
What to learn in Execution
- Explain the iterator model and how next() calls flow up a plan tree
- Implement nested loop, hash and sort-merge join and compare their costs
- Describe external merge sort for data that does not fit in memory
- Compare tuple-at-a-time and vectorised processing
- Explain how hash aggregation handles groups larger than memory
- Describe intra-query parallelism with exchange operators
Execution interview questions
When is a hash join better than a nested loop join?
A hash join builds a hash table on the smaller input and probes it with the other, giving roughly linear cost for equality joins on large tables. A nested loop join suits tiny inputs or an indexed inner side, and handles non-equality conditions.
What is the Volcano iterator model?
Each operator exposes a next() method that returns one tuple at a time and calls next() on its children. Plans form a tree pulled from the root. It is simple and composable, but per-tuple function calls add overhead compared with vectorised execution.
Where Execution fits in the Database Management Systems roadmap
Execution belongs to the Query Processing stage (advanced level). Execute and optimise.
Other units in this stage
Back to the full Database Management Systems roadmap