Skip to content
How Readyset Rewrites Your SQL: Subqueries in HAVING, ORDER BY, JOIN ON
← Back to blogQuery Optimization

How Readyset Rewrites Your SQL: Subqueries in HAVING, ORDER BY, JOIN ON

Readyset used to reject subqueries in HAVING, ORDER BY, and JOIN ON outright, sending the whole query back to the database, uncached. This post extends the rewrite pipeline to decorrelate all four positions, with the soundness argument for the tricky one: LEFT OUTER JOIN, where the obvious move silently returns wrong answers.

Vassili Zarouba

Vassili Zarouba

2026-08-20 · 13 min read

Want to see Readyset in action?

Book a demo and see how Readyset can accelerate your database.