How Materialize and other databases optimize SQL subqueries

from blog Scattered Thoughts, | ↗ original
Subqueries are a SQL feature that allow writing queries nested inside a scalar expression in an outer query. Using subqueries is often the most natural way to express a given problem, but their use is discouraged because most databases struggle to execute them efficiently. This post gives a rough map of existing approaches to optimizing...