Readyset Rewrites Your SQL So It Never Runs the Same Query Twice
The Query Transformation Pipeline

Readyset compiles each SQL query into a dataflow graph that incrementally maintains results as data changes, turning reads into lookups instead of full executions. But the dataflow engine demands binary equality joins, no correlated subqueries, and flat structures. This post walks through the multi-pass rewrite pipeline—normalization, deep rewrites like decorrelation and left-spine hoisting, and cleanup—that transforms arbitrary SQL into a form the engine can compile, including the tricky three-valued logic for IN and NOT IN.
This is the key difference: traditional engines optimize how to execute a query each time it runs. Readyset optimizes once, at cache-creation time, and then maintains the result incrementally forever.