1. Processing Models


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

1.1 Iterator Model

Also called Volcano or Pipeline Model.

Used in almost every DBMS. Allows for tuple pipelining.

Untitled

Each query plan operator implements a Next() function.

<aside> 💡 Pipeline Breaker

Some operators must block until their children emit all their tuples.

→ Joins, Subqueries, Order By

</aside>

1.2 Materialization Model

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.

Untitled

Each operator processes its input all at once and then emits its output all at once.