Query Executor
The component in a DBMS that executes an optimized query plan and returns the result set.
A SQL query passes through several stages before execution: parsing, validation, optimization, and finally execution. The query executor is the final component—it takes a query plan (typically a tree of operators like table scans, joins, aggregates) and executes it operator by operator, row by row or batch by batch, managing buffers, locks, and I/O operations along the way.
An efficient executor is critical: even a perfect optimization plan becomes useless if the executor itself is slow. The evolution of query executors from early SQL systems to modern databases has centered on minimizing I/O, maximizing CPU efficiency, and handling datasets larger than RAM. Parallel execution within the executor—exploiting multi-core processors—became a major focus once multi-core hardware became standard.