Eradication of the Logical Plan
Sep 2, 2026In traditional Database engines, there exists at the very least two IRs: Logical and Physical. SQL queries are transformed, if valid, to a logical representation. Then, a compiler/optimizer/query planner lowers the logical IR towards an optimized physical IR.
The decoupling is needed as the abstract declarative definition of a query has many possible corresponding execution strategies: Join Algorithms, Group By's, Predicate Pushdown and on and on. Yet sufficiently capable LLM technology may enable the eradication of a layer: If one imagines a world whereby all queries can be expressed in latent space, an LLM may intake the query's matrix and output a direct, optimized physical plan. An LLM may also come up with optimizations too uncertain for a deterministic optimizer to find.