Developer Voices

What If Every SQL Query Could Update Incrementally? (with Lalith Suresh)

Developer Voices

Show Notes

There's a problem that's bugged the database industry since the 1980s: you run an expensive query over millions of rows, cache the result, and then a single new row arrives. Logically that's one small update, but most engines throw the cached answer away and recompute everything from scratch. Some will handle changes incrementally, but only for "simple" queries - and the rules for what counts as simple are arbitrary and brittle. So can you incrementally maintain *any* SQL query, no matter how complex? For decades the answer was no. Then an award-winning paper called DBSP proved that the answer is yes - all queries are simple enough.

Joining me to explain how that works is Lalith Suresh, CEO of Feldera, the company built on top of DBSP. We start with the problem itself, then trace how a group of VMware researchers arrived at it from the unlikely direction of Kubernetes and network control planes. Lalith walks through Z-sets, the weighted data structure that turns database changes into something you can add and subtract, and the four DBSP operators - including one borrowed straight from digital signal processing - that let you compile any SQL program into an incremental version deterministically. Along the way we get into which operations need state and which don't, how the delta join falls out for free, building a standalone query engine with its own storage layer and Calcite front-end, backfills as the real Achilles heel, and how this all differs from stream processors like Kafka Streams and Flink.

If you've ever fought with materialized views that won't refresh, watched a nightly batch job recompute three years of data to capture last night's changes, or you're just curious how one elegant bit of maths unifies batch and stream processing, Lalith has some genuinely satisfying answers. There's an MIT-licensed open source edition and a sandbox at try.feldera.com if you want to play along.

---

Support Developer Voices on Patreon: https://patreon.com/DeveloperVoices

Support Developer Voices on YouTube: https://www.youtube.com/@DeveloperVoices/join

Feldera: https://www.feldera.com/

Feldera Sandbox (try it online): https://try.feldera.com/

Feldera on GitHub (open source): https://github.com/feldera/feldera

DBSP Rust crate: https://crates.io/crates/dbsp

DBSP Paper - "Automatic Incremental View Maintenance for Rich Query Languages" (VLDB 2023 Best Paper): https://arxiv.org/abs/2203.16684

Mihai Budiu - "Streaming Queries Without Compromise" (Current 2024): https://www.youtube.com/watch?v=cn1Yaxwl6x8

Mihai Budiu - DBSP talk at CMU Database Group: https://db.cs.cmu.edu/events/dbsp-incremental-computation-on-streams-and-its-applications-to-databases/

Differential Dataflow: https://github.com/TimelyDataflow/differential-dataflow

Apache Calcite (Feldera's SQL front-end): https://calcite.apache.org/

Kafka Streams: https://kafka.apache.org/documentation/streams/

Apache Flink: https://flink.apache.org/

ksqlDB: https://ksqldb.io/

Apache Spark: https://spark.apache.org/

Snowflake: https://www.snowflake.com/

Databricks: https://www.databricks.com/

Kris on Bluesky: https://bsky.app/profile/krisajenkins.bsky.social

Kris on Mastodon: http://mastodon.social/@krisajenkins

Kris on LinkedIn: https://www.linkedin.com/in/krisjenkins/

More from Developer Voices

Sep 25, 2026

How would you manage 30 million lines of PHP? You can't rewrite it - you'd be fired long before you delivered. That was the problem facing Facebook around 2011, and their answer was to add a type system, giving birth to the Hack language. But adding types to PHP turned out to be the easy part. The hard part was building a type checker that developers used to "edit, save, refresh" would actually tolerate. So how do you type-check tens of millions of lines of code fast enough that nobody notices?

Aug 26, 2026

Building something people actually want is supposed to be the happy ending. But it arrives with a bill attached: feature requests you didn't ask for, pull requests you'd rather not maintain forever, users demanding the one thing you swore you'd never build, and — if you're unlucky — a company where the sales team quietly starts deciding what engineering works on. DuckDB has spent the last two and a half years working through that list. So how do you stay a database engineering team when success keeps trying to turn you into something else?

Aug 12, 2026

My guest this week is James Brown, an engineering lead at Schroders, and that's a useful vantage point — asset managers carry all the regulation and organisational weight of a bank, mixed with the first-to-market pressure of a startup. James starts with his own "Claude mania": months of agents running around the clock, and the wave of anxiety that hit him one morning walking to the shop without one running at home. From there, Clair — the plugin he's building to give coding agents proximal awareness of each other, using git orphan branches as a zero-infrastructure message bus; why AI behaves like oxygen in a room full of tiny fires; what "going well" actually measures inside a regulated firm; and why he thinks team sizes won't change, even when the number of teams does.

Mar 26, 2026

AI is changing the way we all build software — that much seems clear. But the landscape is moving so fast that even the people paid to keep up are struggling. MCP or skills? Fine-tune or just prompt? LangChain or let a thousand agents loose? With almost 70 competing technologies and a shelf life of maybe six months on any advice, how do you figure out what's actually worth your time?

Feb 19, 2026

I have a theory that only bad projects get finished — good ones keep finding new things to do. Asciinema is a case in point. What started as a way to share terminal sessions with friends has, over 14 years, grown into a full suite of tools covering recording, hosting, playback, and live streaming — and been rebuilt multiple times along the way. So what does it actually take to record and replay a terminal session faithfully in a browser?

See all episodes →