A DBMS's processing model defines how the system executes a query plan.
<aside> 💡 Plan Processing Direction
Approach #1: Top-to-Bottom
Approach #2: Bottom-to-Top
Also called Volcano or Pipeline Model.
Used in almost every DBMS. Allows for tuple pipelining.
Each query plan operator implements a Next()
function.
Next()
on its children to retrieve their tuples and then process them.<aside> 💡 Pipeline Breaker
Some operators must block until their children emit all their tuples.
→ Joins, Subqueries, Order By
</aside>
Better for OLTP workloads because queries only access a small number of tuples at a time.
Not good for OLAP queries with large intermediate results.
Each operator processes its input all at once and then emits its output all at once.