R2 SQL: a deep dive into our new distributed query engine
blog.cloudflare.com·23h·
Discuss: Hacker News

2025-09-25

11 min read

How do you run SQL queries over petabytes of data… without a server?

We have an answer for that: R2 SQL, a serverless query engine that can sift through enormous datasets and return results in seconds.

This post details the architecture and techniques that make this possible. We’ll walk through our Query Planner, which uses R2 Data Catalog to prune terabytes of data before reading a single byte, and explain how we distribute the work across Cloudflare’s global network, [Workers](https://developers.cloudflar…

Similar Posts

Loading similar posts...