Conceptual
Login

Correlated Subquery

A correlated subquery references columns of the enclosing query, so its result depends on the current outer row and it conceptually re-executes once per outer row. This per-row dependency is what distinguishes it from an independent subquery that can be evaluated once.

Questions this Concept answers

  • Why does a correlated subquery scale badly as the outer table grows?