The alpha, twice a week
That was 7 min.
Get the best new moments in your inbox every Wednesday and Saturday. It's free.
Check your inbox
We sent a link to your address. Click it to finish signing up. Not there in a minute? Look in spam.
or
Latent Space · 7 min · Jun 24, 2026
Databricks is building a database engine from workload traces
Reynold Xin explains how a new engine uses years of workload traces to predict which algorithms suit different queries.
The episode’s best minutes
Full analysis- 19:19Agent security needs policies that track session context3 min
- 35:30LTAP grew out of a prototype that wrote database data to Parquet3 min
- 44:58Databricks is building a database engine from workload tracesPro pick 7 min
- 5 more moments in the full episode
“very, very quickly tell us how any algorithm and how any implementation would perform for any specific type of queries with very, very high fidelity.”
Takeaways Pro pick
- Use real workload traces to evaluate algorithms and implementations.
- Query shape, data distribution, and latency needs change the best choice.
- Roll out a new engine incrementally instead of waiting for a full rewrite.
One of Pro's picks, open to you here. Try Pro free for 7 days
One of Pro's picks. The rest of the summary and the 3 takeaways are in Real Alpha Pro; the video, the quote and the transcript stay free.
Read it with Pro, 7 days freeAbout this segment
Reynold Xin explains how a new engine uses years of workload traces to predict which algorithms suit different queries. The team designed the project to roll out incrementally rather than wait years for a full rewrite.
Co-founder, Databricks

Shawn Wang (swyx), Host · Co-founder, AI Engineer
Wrote “The Rise of the AI Engineer” and founded Smol AI, maker of AI News.
From “The Agent Cloud: Databricks’ Bet on the Future of AI — Matei Zaharia and Reynold Xin”, Jun 24, 2026. Watch the full episode
Thanks. We'll look at and fix what's off.
Transcript
From the transcript Latent Space publishes with the episode.
- 45:02
So one of the thing we, uh, realized maybe a couple years back is that actually every single database engine out there, uh, especially on the analytics side, are kind of a decade old. Um, pretty much everything that have reasonable traction are about a decade old. And they all started targeting some very specific narrow use cases, and then over time it's become more and more successful. They've grown in their ambition, and then they try to support more and more use cases.
- 45:27
But the fastest way to support those use cases tend to be hack around the abstractions that were initially created, that were not for those use cases. Yeah. And then, but you can kind of support them more or less okay. And before you know it, after 10 years of organic evolution that way, it becomes a gigantic pile of shit. [laughs] Um, [laughs] the... And th- but that includes Databricks. And very, very few company or very few systems, I think, have the, uh, gut to say, "Let's go sh- start from scratch.
- 45:57
Let's go back to the drawing board and design knowing everything we know today after a decade of workloads and probably billions in revenue. Let's attempt to rewrite it from scratch and actually make sure it will work and it can support all these use cases." So we started doing that, but it's a very ambitious project. Uh, by the way, you can search on Wikipedia, there's this thing called second system syndrome. Yeah, I know that. Yes. Or second system effect. Every developer must know- Mm-hmm... what a second syndrome is.
- 46:24
It's basically you built your first thing and it works out great, and the second one's bound to fail because you become too ambitious. [laughs] And then you ask so many requirements. Or like, you know... You think you know everything- Yeah... and then you're like- You just-... you're, "I'm gonna design the perfect system this time." Yeah. And it turned out it's not perfect, and then it start failing and you're too ambitious, never launch, um, and you get killed. The... And the engineering team that actually started this, they were brilliant.
- 46:45
I think we hired some of the best database engineers, um, on the planet into Databricks, and they were brilliant. Thank God it's not their second system. Many of them- [laughs]... have built more than two in the past. Ah, nice. But they were still worried about this, hey, building a database engine from scratch, I think the conventional wisdom is gonna take, like, five years to mature. This would be a very long-term project.
- 47:05
It could fail. Um, I think one of the engineers kind of jokingly said, "Hey, maybe we just call it Reynolds Dream Engine." Mm-hmm. If we name after a co-founder, maybe we then may get- Mm... canceled or killed. But I think they built something pretty remarkable. Um, they went back to... They, they kind of changed the way the database engines were built from a paradigm point of view. Usually, when you build a database engine, you read a lot of academic papers, you try to understand what are the latest algorithms and data structures, and you put them together and see if they work or not.
- 47:32
And there's a high risk of failure there also because whatever that looks really good on paper might work out, might, might actually look really good in 70% of the workloads, but then it backfires on the other 30%. Um, they actually went build a more of a factory for building the database. So they spent more time building this factory, and the factory takes the decade of traces we have. I think they count as, like, quadrillion data points in the trace table. You don't drop anything? Or you see sample? We for sure sample, but- Yeah... the, there's, like, massive amount of things.
- 48:06
And the, uh, and they use that to build a model, um, like a machine learning model. Not an AL, a machine learning model. Machine learning model basically it can very, very quickly tell us how any algorithm and how any implementation would perform for any specific type of queries with very, very high fidelity. And based on that, they can, uh, pick the most likely algorithm and data structure that would actually help with the different kinds of workloads. Mm-hmm. Both at runtime as well as at implementation time. Mm-hmm.
- 48:37
Because there's, like, unlimited number of- I mean, it sounds like you want to, like-... papers and unlimited number-... route to different data structures. Mm-hmm. Yeah. I mean, if you think about it- This is not one database... a single database has many things implemented... together, but you want to make sure they all work well- Yeah... with each other, and then for any given operation, there might be more than one implementation, so it would make it actually run really, really...
- 48:57
Uh, reality is things, algorithms that work super well, for example, for very, very low latency might not work very well for, say, scanning through petabytes of data. Yeah. Right? Actually, most often there's a trade-off there between throughput and latency. What are the key dimensions, like scale, throughput, latency? What, what, what- Yeah, scale... anything else? Um, and, and the distribution of data. Yeah. Right? How sparse the data is- How hard, uh-... that matters- Yeah... very a lot. Um, how frequently do you hit the same data? Yeah. Like- How many distinct values- Yeah...
- 49:24
and stuff like that. Those things matter a lot. Yeah. Like, number of distinct value basically impacts the memory consumption of your aggregation, your hash... Like, at some point there's a hash table. Somebody, uh, I, I'm gonna, in my write-up, I'm gonna try to list all this out because I, I really want a taxonomy. To me, taxonomies are so helpful because it covers everything that you should think about.
- 49:41
I think if you actually try to list it out, there'd probably be like a million different features. [laughs] I always find like, okay- It's not a trillion... give me, give me like 12. Give me, you know. [laughs] 12. Um- You know, you know, like a, someone did, like, I think a Oracle paper in like 40 years ago did like the, these are the eight fallacies of distributed systems. Mm-hmm. Yeah. Mm-hmm. Right?
- 49:57
That kind of thing is super useful. Yeah, it is. It's like, okay, think through these eight. But let me give you a very, uh, weird example, uh, but it actually has a profound implication on performance, which is, like, is your string just ASCII or does it have Unicode in it? How should you encode it? Strings, I mean, strings are the most complex data types. [laughs] Yeah. So the, and that... Like, for example, if string is super dense, you could actually convert every string into a...
- 50:20
Like, imagine you have to do a aggregation. Instead of having a hash table, you could actually have an array. Because if your string is dense enough, if you only have 256 options, you don't need a hash table. You can just do array- Yeah... lookup. Yeah. Um, and that- Yeah, if the string-... that would be far faster... is like a country code or something. Yeah. Yeah. So it's actually, like, probably millions of, uh, features in that model. But using that, they can, one, basically prioritize the different algorithms that might actually impact in practice.
- 50:49
And many of them are very counterintuitive. These aren't necessarily things that you think, hey, might work super well, actually don't work that well in practice. But also, more importantly, at runtime, you can dispatch the right algorithm and structure. I'm listening to, uh, to the, the dream. I feel like Databricks is, is doing a really good job of the incremental evolution. Do you have to hard cut to a new system at any point, or like, you know- We designed it in a way that it can be incremental. Yeah. So first we're releasing a new endpoint.
- 51:15
Uh, but, but this goes to the broader ocean versus... W- what we wanted to do is we wanted to, by design, this new engine should be able to do everything we were able to do before and better, right? It's, in particular, the better part refers to very low latency, low latency workloads that can sort of finish in tens of milliseconds. But we want to roll it out incrementally with incremental capabilities so it doesn't take, like, five years to actually, uh, see the light at the end of the tunnel. I think that's a heroic task.