1. Podcasts
  2. The MAD Podcast: How AI Gets Built — with Matt Turck
  3. What Happens When Billions of AI Agents Hit Your Database? (Andy Pavlo)

vo listened to this episode to put together the overview and transcript, so there may be the odd mistake.

In short

How AI agents change database usage and safety—agents now read, write, branch, and sometimes delete data; what guardrails and protocols (permissions, branching/snapshots, MCP) are needed; and how agents can also help build and tune databases (self-driving DBs, auto-tuning, text-to-SQL via semantic context). It also covers “everything is a database” (file systems as databases) and whether graph databases are necessary.

Guest backgrounds

Andy Pavlo is a Carnegie Mellon University professor known for database courses; he joined ClickHouse to found ClickHouse Labs. He previously worked on database management system research, including auto-admin/auto-tuning and “self-driving” database ideas.

Key claims

Vector search/RAG was an earlier phase; the new shift is agents that create and modify databases. Branching/snapshots let agents test changes safely. Guardrails must prevent agents from dropping tables/deleting records in production. With enough semantic context, text-to-SQL accuracy can reach ~99.5% (bank anecdote). Agents can implement large parts of database systems; open-source commits increasingly come from AI coding tools. LLMs can get ~85% of tuning improvements quickly.

Notable examples

Replit agent deleting files in a widely publicized incident; “branching” via GitHub Actions/PR testing; approximate nearest neighbor for semantic queries (e.g., albums by NYC artists); Wu-Tang Clan exam question; 60%+ of open-source DB commits attributed to AI coding tools; Peloton as his earlier “self-driving” database project.

Transcript

0:00What is a file system? It's a database, right? Everything's a database. Every month there's a story where someone lost their production database because the agent deleted something. It's the Wild West for people that don't know the history of databases. It's just like, you know, taking a cheetah, giving a bunch of cocaine and putting in a Ferrari. Like the amount of speed that people are developing these things is insane. That is Andy Pavlo. In the world of databases, Andy is about as close to a god as it gets. The Carnegie Mellon professor whose courses taught an entire generation of engineers about databases and as it turns out, the AI models too.

0:29Andy recently made some waves by joining ClickHouse to found ClickHouse Labs. Now, not long ago, databases in AI meant vector search and rag, but today agents create databases, write to them and sometimes even delete them. Welcome to Databases in the Age of Agents. I'm Matt Turk and this is the Matt Podcast. Andy, welcome. Hey Matt, how are you doing, man? Good. I'm excited to talk about all things AI, agents, databases, Larry Ellison, we have two, and then Wu-Tang Clan. We definitely have Wu-Tang Clan. Do we have to about Larry Ellison? I mean, it's like a little early to come out of the gate.

1:06Although he is hilarious because he's like the super villain of databases. It's like he owns a Hawaiian island. Well, that's supposed to be working out for him. All right. We can graduate to talking about Larry Ellison later in the conversation. I will say my contract with ClickHouse doesn't allow me to talk about Larry Ellison. I made sure that was in writing. All right. Awesome. I want to take it from the top. So two years ago, the topic of databases and AI came up. There was a whole era of vector databases and this whole idea that you need to do RAG in connection with chatbot searches. That was kind of two years ago.

1:42I think a lot of people's mental models kind of like stopped there in terms of like this intersection of databases and AI. Clearly, we are in the age of agents now. How is that different? What does that change? I mean, the vector databases, although you're right that like the in terms of being in the zeitgeist of AI and databases, you know, probably two years ago is when the RAG vector came into play. But the vector databases themselves, like a lot of them around since like 2016. It's just now that the use for them became obvious because you can use them to enhance and improve agents doing things.

2:19So I think the vector database market is interesting because they were early in the space, but they were really pushing the idea that you want to do this, you know, the approximate similarity search on vectors or embeddings instead of doing an exact search that database systems have traditionally done. And this helps, too, when you're dealing with natural languages that where the semantics of maybe what you're trying to look for or query against isn't, you can't precisely define. Like, find me all the albums in, you know, from artists in New York City that talk about doing, you know, certain kind of activities, right?

2:58It's very hard to define exactly what that is. And the magic of approximate nearest neighbor search with these vector embedding searches in a vector database is that you can look up things based on the semantics of the thing you're looking for. And just sort of it works out that way because you're not trying to do exact keyword searches. So when ChatDB blew up in 2024, 2023, and again, when everyone became aware that this is now a technology that exists, the vector databases were in the right position at the right time. because they could augment and improve these chatbots. But the moat, if you will, wasn't that big because at the end of the day, it's just an index.

3:35And within a year, pretty much every single database vendor had their own vector index. And now it's become sort of standard table stakes. Like every database system that everyone's using has their own vector index. Now, it doesn't say that the vector databases can't do certain things better than what a traditional database system could do. It's just now that everyone has that basic functionality. So I think that you still use vector searches to enhance and improve the chatbots or the agents now. It's just you don't need to have a specialized one database that can only do that. And agents now create databases, use databases, can make changes to databases.

4:17So maybe a year ago when Databricks acquired Neon, there was a stat that I believe said that the number or the percentage of agents creating Neon databases went from 30 % to 80%. Or the databases created by agents was larger than anything else. Unpack that for us. What does that mean, an agent creating a database? Why does an agent need to create a database in the first place? The creation of a database and then there's branching of an existing database. And I think the database metric was about like the branches being created by agents. So what does branching mean? So branching is when you have a database system or sorry, a database, and you want to make a sort of copy and write snapshot of that database and have it look like two unique databases.

5:07And the reason why you want to do that is you could have your production database that's running your business, your application, like where all your, you know, the system of record, or all your changes are going into. But then you want to have either a human developer or an agent be able to start trying out new things, make changes to the application, and you want them to operate on the real database. Because oftentimes, traditionally, you would make copies of the database or have a smaller version of the database, like a sample would already exist there because it's just too expensive to copy things around.

5:36So you have like a staging or development database, and then you would then hopefully apply your changes to the production database, and you have things that once you go to the larger scale, everything works out. So what branching allows you to do is it allows you to make a snapshot of the real database, have all the changes that you make go to the snapshot and not affect the production database. And once you're okay with the changes you've made, maybe not necessarily for the data, but it's usually for like the schema or the application code. Once you know you've vetted it on the snapshot, then you can put it live in the production database.

6:06So now with these agents, people are spinning up these coding agents to write new features, write new parts of their application. It's not something humans are doing anymore. And now you want to have these agents, they want to vet their changes on a copy of the database so you can create branches on those things. Often it just shows up when you're running testing as well. Like a lot of times the branches are created by PRs running in GitHub Actions or testing things like that. So you want to run your tester code on a copy of the database rather than the live one. So it's mostly being this branching capabilities used for development.

6:40So agents are, people are using agents to write a lot of new code. And so you want them to run in their own sandbox, you can make a snapshot of the database. So the branching capability is super useful for that. Yep. Even more sort of simpler level, an agent needs to create a database because agents take actions on the world. And if you ask an agent to create an application, an application at the end of the day, steal database. Yeah. So certainly, like if you say, like if you create a database from scratch, then yes, your coding agent, you give it the prompt, say a billion application does this.

7:10then yes, it will create a database right away. But most of the branches or new databases, if you want to call it, that are being created are for this development. But yes, the agents can now create databases. For better words, you can help them drop databases. People often get in trouble with this because it's doing things that they shouldn't be doing. Yeah, there was last year as well. Every year there's some story. There was some incidents that was very interesting and it got pretty widely publicized on X4. what it's worth is Jism Lankin that was trying to build something with Replit. And I think the Replit agent went to the database and deleted a lot of files, which then subsequently Replit made the right adjustments.

7:51You know, obviously all of this is the Wild West and people are learning as they go and mistakes will be made. But it's the Wild West for people that don't know the history of databases. Like for years, we've had the capabilities to make sure people don't do things they shouldn't be doing, like stupid things like dropping a data table or deleting records. Those, you know, those controls exist. It's just everyone wants to reinvent the wheel and people learn the hard way of just doing what's already been done in the past. Let's expand on that point. So what does that mean? What does, what needs to exist in the urgent world for databases that is not currently in place?

8:29Guardrails, right? It's like, you know, you wouldn't, you know, you wouldn't bring a new, you know, have a new child, a new toddler and just like not put up the guardrail so they don't fall down the stairs or, you know, put their finger in the socket. Right. It's the same kind of thing for these agents. They're thinking of them as like toddlers. A little more sophisticated than that. But like you don't then run wild or do whatever they want on a database. Now, you could sit and babysit it and just say approve, approve, approve, like, you know, cloud code or whatever. But of course, then you can't scale and have hundreds of agents trying to do things at the same time.

9:01So you want to set up the right permissions and controls so that they can't go into the production database and drop tables that they shouldn't be. And likewise, you don't have to go read things they maybe necessarily wouldn't want to read as well. So if you have the right guardrails and through branching or whatever means you want to create these sandboxes, you can avoid disasters. There's like, you know, every month there's a story where someone lost their production database because the agent deleted something or did something they shouldn't do. With the right guardrails in place, you can assure that these things don't happen, right?

9:31People get lazy. They use the same password across, you know, entire company organization. And then they give the same password to the agent. And I wonder why the agent started doing things they shouldn't do. Should those be the same guardrails as what currently exists? Yeah, so maybe the larger question is like, do agents at least now behave differently than humans? Other than just being going to run 24-7, I haven't seen anything that would suggest the fact that they don't develop the same way, software the same way, they're inaccurate data the same way that humans do, right? At the end of the day, the data system only sort of exposes so much different capabilities and that's the API that gets exposed to you.

10:14So as long as you can constrain those things for human using those APIs, you can do the same thing for agents. But the level of sophistication of what those guardrails could be beyond just like don't run delete or update on a table, the level of sophistication really matters on what sort of product you're using. And I will say this is something where like, you know, I like open source databases, but like the enterprise commercial legacy databases, if you will, they've already done all this, you know, for humans in the past. So they have a lot of protection mechanisms you would want to expose that to agents as well.

10:51Understood. Is there anything that's fundamentally different compared to humans? I think you alluded to volume and scalability. Does that change everything, the fact that you have possibly billions of agents taking actions? and how they interact with databases i gotta be honest i don't know the answer right like it's still really really safe and i get um i mean the volume of course yeah right because agents are running 24 7 uh in a way that humans cannot but we've we've seen similar patterns in databases before where we've seen increase in volume and i would sort of say there's been three eras and we're now in the fourth one like the first one was like at the very beginning of just having a database in general like that you can now start putting in information and run transactions and store things for your organization in a way you couldn't before when it was all pencil and paper so probably like 70s and 80s you know there was a obvious increase in the volume of traffic you need to handle in a database but in that era it was mostly humans interacting with the database but at their jobs because no one would go home and no one had a computer you know necessarily in like the 80s certainly not the level we had now so that was sort of say one era we had an increase in volume then in the 1990s early 2000s the internet comes along and now everyone can interact with databases through websites and through the internet at home so you saw you know sort of spike in volume that way in that level then the next era would be mobile phones and now everyone at any any given time is has has you know various apps running they can interact with websites then you know put things and read things from from databases so i would say that would be a theory so now agents i think is the next it's the next chapter in the story where now it's every human not only has a cell phone but now they also can have maybe hundreds of agents interacting on their behalf uh that are then interacting you know the reading writing data from from a database now the day when you name an application it's always be backed by a database so you know it's gonna it's gonna cause the application to read and write information and read and write data so i don't think we're there yet because every human obviously doesn't have hundreds of agents running 24 7 but what's interesting about what could happen is the when you think of a human interacting with their cell phone or their laptop on a website or an application they're kind of really only doing it when they're awake right you know i can only do one thing at a time like i can't sit with my one cell phone in one hand the laptop another hand like do things at the same time it kind of only is limited what the human can actually do um but you can imagine a world where these agents are just 24 7 always running and acting as if they were humans interacting things like the volume would increase quite significantly.

13:26And then furthermore, unlike like a web app, they're usually going to be, you could argue like, you know, how's this agent really different than like IoT devices or cell phones now. Like IoT devices, you're just streaming inserts of here's the measurements I'm getting. You know, with cell phone apps, you're usually reading data, right? But you can imagine these agents do more complex operations where it is a combination of read and writes. And then that makes the traffic more interesting. So I think there's going to be potentially at 10 to 100x in increase in volume and the number of queries that are going to hit up against databases.

13:58And I don't think, we're not there at that level yet, but I definitely have heard from my friends in industry that they're seeing the sort of thing. We've seen the same thing at ClickHouse. What I don't know yet though is whether the sophistication of the interactions are more or less than what humans can currently do. I've seen some people say, well, the type of queries that the agent would generate or SQL queries the agent would generate is actually more shallow because it's trying to like maybe read one or two tables at a time, try to figure out what's in there versus like if someone uses a dashboard or like a BI tool like Tableau or MicroStrategy, they may be doing like very complex joins across the different tables.

14:38I don't know yet whether agents are at that level or whether they're just kind of going at it, really trying to read data against the database in more simple terms. So I mean, so your question is like, are agents going to change things? I think yes. right now definitely in volume. And I think that's going to increase even further. And of course, now when the agents are running, they're generating their own telemetry so that you have to store that and make sense of that. And that's another challenge. But in terms of like whether the actual patterns of what they're doing, how different is that yet?

15:07That remains to be seen. This is something I'm trying to research as well. Yeah. Some fantastic stuff in there that I want to go back to in a minute. But there is a concept of agent memory that seems to be a little bit of a battleground right now with, on the one hand, file systems, and on the other hand, databases. What is your view? What is a file system? It's a database, right? Everything's a database, right? You have a directory, a bunch of Excel files. That's a database, right? You have a notebook, a pencil and paper. That's a database. Like when my daughter was like three, we would, you know, we're trying to teach her the importance of databases and I would make her write down, well, we'd do it together.

15:49We'd write down the temperature every day, you know, in a little line notebook and she'd close and go commit to save the data. That's a database, right? It really comes down to what the form of the input of the context you want to provide to your agents are now. And as far as I know, it's all human readable text, right? So whether or not that human readable text comes from a bunch of JSON files you have in your directory or it's extracted from a database system that can then convert that into the correct input form. At the end of the day, it doesn't matter. I think that there's obviously advantages and safety guarantees you can get when you use a data submitter system that can protect data.

16:34like SQLite is famous for this. Why would you want to use a file system and try to manage whether you're writing things correctly and safely and that you can multiple changes and commit this versus like just SQLite just does it, right? So like at the end of the day, everybody should be putting everything in a database system. Even some file systems like WinFS underneath the covers, it's a database system, right? Yeah, there was a piece that also like went viral at some point. I think that was entitled, I recreated that database by accident, like talking about like file systems. Okay, interesting.

17:03Interesting. Does the world of like multi-agents, sub-agents, agent swarms, does that require more of a database? Meaning like this sounds like computationally very complex and therefore having something that's extremely heavy duty on the other side seems to make sense. At the end of the day, if you need to share a state across multiple machines or instances of these agents, whether they're running on the same box or not, Like, again, a database management system provides that capability that you could have, you know, multiple readers reading the shared state, right? I haven't seen anything where, like, agent, it's like, it's part of its memory lookup is you're pushing down, like, filters and things like that into the database.

17:51Usually that's provided as part of the context. Again, this going back to the RAG or the Vector-based stuff. Like you provide the context based on what you've already looked up against the memory in the database files or the database itself. So, again, from my understanding is that the API for the input of the context is just human readable text. And whether that comes from a file system or a database system, it doesn't matter. But the database system provides certain guarantees and luxuries, if you will, that a file system can provide. And shared state is one of them across multiple agents. Have you seen the agent world converge towards a specific type of database?

18:29I mean, you're asking like in terms of like using it as for memory or having an agent choose one particular data system over another when they build an application? More the, actually both. So maybe the latter. The latter one, obviously they're fed on, the models are trained on what people are writing about. And so, you know, if I say I'm building a new application, chances are it's probably going to recommend Postgres at this point. Because that's what's in the pre-treating. Yeah. And I will say, I can't say who. I've had two database companies ask me how to get their database to be recommended first by an agent over Postgres.

19:09And I was like, that's not, first of all, that's not what I do. That's not research. And two, like, don't talk to me. Go talk to the guys building the models. because that's clearly something that they could have sway in. It's basically like SEO. How do you get the agent to learn, like, hey, I should use my database X instead of Postgres? I would suspect that your writing is highly indexed by the search engines and therefore pitching you is aware of pitching the model. So this is very much a first-word problem and I'm not trying to say like a humble brag, but like one problem I do have is when I ask questions about databases, it cites me back to myself because all my course materials...

19:44Which has to be somewhat satisfying. Yes. Well, no, but it's like, no, because like, say when I was teaching data courses, I would say, you know, show me, I want to learn about data systems that do this version of it kind of index, like a B plus three or whatever. And I would say, so now I have to say like, I already know which ones do do this. So show me the ones that don't do this. And then I have to say, also don't cite Andy Pablo or any Carnegie Mellon. But then the problem is that our course. As a model replied, you know, I know you're Andy, right? Chat TV, yeah. Chat TV actually says, like, I know who you are.

20:17I've said something like that, but perplexity doesn't do this. But the problem is also, too, is all our course material is open source, so anyone can just take and use it. So then it says, okay, well, you can't cite Carnegie Mellon University. Let me cite another university, but it's just my slides being used at another course. So I've got to be, like, very specific about what not to return back to me. um so i think that i mean she reached a question like i think for otp i haven't tried this in a while but usually it spits back hey we should use postgres unless you say something like very specific like uh you know i'm going i'm going to run on embedded devices then it'll say use duck db or sqlite or something like that or i only care about key values and i come back and say like use rocks db but in terms of for otp it almost always says use something you use postgres and then you might recommend like do you want to host a version or not right if you have further chats um for OLAP I I'd be interesting to see if there's any kind of ranking on this it's actually not a bad idea uh maybe somebody's already done this but like that one it definitely would come back and maybe you have to refine it further and say like I'm looking my workload looks like this my data looks like this and then I think it can give a more nuanced answer I haven't tried this in for about a year or so but I've definitely seen before like it's like oh you know do you have any money yes okay you could use snowflake or databricks do you have no money okay you use duckdb or you know do you want to run on-prem you could use click house things like that um so and then your second question was uh about agents well which one should they recommend so that's that's the that's the answer to which one they do recommend uh but uh which one should recommend yeah and where we're going with this partly is uh you know this question of of of speed, and that's where, you know, ClickHouse shines, and we'll talk about ClickHouse more later.

22:04There's perhaps a concept of, you know, context layer, ontology, which seems to be pushing towards the graph databases. Are they, you know, what makes sense? I mean, I have strong opinions about the graph databases. I don't think you need one. I think that can be, I have not seen any benchmarks that show graph databases, the native graph databases, outperform relational databases systems when those relationships have the right constructs in SQL or the API so that you can do graph traversal all on the server side and not go back and forth. The SQL standard in 2023 added support for property graph queries.

22:43Oracle supports it. Postgres was supposed to support it this year. It's coming out, Postgres 19, but I think it got delayed or rolled back. I don't know why. But anyway, beside the point. No, I think that But I mean, the context layer, again, depending on the requirements of how many agents you have, whether you have shared state or not across multiple agents, Postgres often should be the first choice for many of these things. For OOTP, if you're doing analytics, that's a whole other story. Let's talk about MCP. Yes. So over the last year or so, it seems like every database provider added an MCP server to their offering.

23:23Thoughts on that? Like pros and cons. And I'm coming from the, you know, a year or two ago, there was like this whole like tech to SQL kind of movement where everybody was trying to make LLMs work on top of databases, especially for analytical purposes. And that sort of didn't work. Are we there now? So tech to SQL, it's like natural language to SQL. So this is something people have been trying to do since the 70s, right? and every so often there's you know maybe a there's a you know some kind of breakthrough natural language processing people say okay now finally it can happen right it hasn't happened except for llms i think um the i've been skeptical of the academic literature uh and research publications on various frameworks to do texas equal because oftentimes the benchmarks are showing spider and a couple other ones like these are well-known benchmarks that you know the models are trained on so like of course it's going to regurgitate the correct answer i actually was talking to somebody from a very large bank yesterday who said they now have a text-to-sql interface uh but in the initial implementation of it they were doing something off the shelf and they they further refined it a little bit further in-house but it was about 60 accuracy meaning like the the the the lm or the agent could produce the right sql query to produce the right answer 60 % of the time.

24:47And that's roughly what I think I've seen before in some other reporting. But they said through this, providing a more rich semantic layer, a context layer over multiple years and millions and millions of dollars to make this work, they were able to get it up to like 99.5%, which is insane. I think that is, I think that's a viable thing now if you invest the time to have the right semantic layer and the context information you need. so the the model is has has the alo sorry the agent has enough information to how to derive the right sql query from the question you're asking i think again that's a large bank with infinite money and they pull this off i think if you just download something now a random person will find that these existing tools are not going to be at that level of proficiency and accuracy but doesn't mean we can't get there right um so now in terms of mcp the the model context protocol like i get why they did it i think this came out of anthropic and then everyone sort of quickly adopted it as as the as the standard um and every time there's every so often there's a hacker news post saying like mcp's dead or whatever like it's i don't think it's going away it's basically a rest interface right a standard way to specify what you want the the the request to be from the agent to whatever you know data system you have and then that's that that data system that receives the mcp request it's their job to convert it into whatever the correct api calls is get the data you need and in the case of database systems is going getting you're writing the sql query to go get the data you need but usually it's either you know oftentimes it's a strict translation of what being passed to you and not like trying to derive the semantic meaning of the mcp request because mc request has to be somewhat well defined um i have no problem with mcp i think that like it's not it's not this magic bullet that solves all the world's problems it's just a digital interface right uh that you can now interpose or interoperate these different agents and different systems to collect data you need so i'm all for it because it's just you're using the data that's more rather than some some homegrown thing so yeah fantastic it's great could it be improved i mean like i think it's it's inefficient because you're sending human readable text over you know over the network to go achieve data there's obviously better ways to do this with binary protocols but But like, at the end of the day, it's good enough, right?

27:07And it seems to be the standard everyone's using. Should it be that security layer that you were alluding to earlier? Yeah, so like you could, but it's no different than the, if the request came from like SQL from a traditional application client with using JDBC or ODPC, like, you know, the network protocols or terminals for these different data systems. It's no different if it comes from that versus, you know, a REST request with MCP. in the day, like, okay, I got those requests. I need to understand who's asking you for it, what are they asking to do, and should they be allowed to do it? So the guardrails we were talking about before, they're the same if it's coming in a SQL versus the same as coming in MCP.

27:47Okay, so that's one part of the conversation that's databases as a memory layer or execution layer for agents. Let's flip the discussion into what AI can do for databases. So clearly we live in a world where AI can code just about anything. Is that true of databases as well? Yes. So to give one anecdote, I teach a course on database management systems at Carnegie Mellon University. A year ago, the agents couldn't do our entire project. So the projects would be like, we give you a scaffolding with database system and you have to implement the indexes, the query engine and things like that it could do some of it not all of it uh i think it was opus for whatever that whatever anthropic put out last year then that just opened the floodgate the agent basically do all our assignments right without very little prompting and of course there is a lot of training data for it because all our projects are open source they're all on github not just students at Carnegie Mellon university but also students outside of the university we let them use it so there's a lot of training data for them to implement things um and so i think agents basically could implement anything you would want to build a database system now.

29:01Obviously, you have to prompt it the right way and hold its hand and make sure you generate the right design or produce the implementation based on the design that you want. At the end of the day, I think the agents are very capable to be able to do this. So they could build an entire database because my experience of building databases as a venture investor is that it's a 10-year journey of pain where nothing much happened for three years and you have some of the smartest people in the world getting together to solve what seems each time like insurmountable problems. So we're now saying that you can build the whole thing?

29:34Yeah, the old adage from database systems is that it takes 10 years, but it's a system. You can build the first 90 % in three years and then the remaining 10 % takes the next seven years. So yeah, no, I think that the agents are very capable, you know, with enough tokens, of course, and then with enough guidance, people can you can build vibe code entire data system and there's certainly companies they're doing this now and every single company is using agents to help develop things so one of my I love data this is one of my side projects is the database of databases dvdv.io and one of the things we do now is we keep track of every single data system that I know about and for the open source ones every single night we pull down all the latest commits on github and we let me track to see which ones are actually being co-signed by codecs and things like that.

30:27And obviously, people turn that feature off. You don't know whether it's actually being generated from an agent, but most people don't do that. And at this point, I think 60%, over 60 % of the open source database systems have commits coming from agents. And so does that beyond the writing also apply to the running of it? So going to that cell-driving database concept. That's something that was a big project of yours 10 years ago, I believe. Roughly, yeah. It's Peloton. Yeah. Yes. So walk us through that journey. What was not possible then that has become possible today? Yeah, so when I started at Carnegie Mellon University, one of the things I did was, my first year, I would go visit companies and sort of see what sort of challenges they were facing with databases.

31:16And the overarching theme I saw over and over again was like just, you know, running these systems, maintaining them and optimize them was a huge struggle. And this is not a huge revelation for me. Like people have been trying to do this for decades. I mean, since the creation of the relational model and relational databases in the 1970s, people have been trying to do, you know, auto-tuning for indexes, partitioning keys, sharding keys, and tuning knobs and so forth. Microsoft Research did a lot of work in the early 2000s in this auto-admin project. They had a bunch of tools allowed to manage can optimize data system automatically.

31:49And for context of this, because there's thousands and thousands of possible configuration of a database. Right, so there's like, what indexes should I have in my table to speed up queries? And obviously, if you have too many indexes, the writes go slower and you run out of disk space. There's the various knobs that control the runtime behavior of the system, how much memory to use for one memory pool versus for indexes and so forth, right? This is beyond the capabilities of any one human to reason about. And then if you start looking at, if you have thousands of databases, You can't have, you know, it's just not possible for anybody to manage these things.

32:19So we spent some time looking how to build automated tools using machine learning and then what you may be able to call AI now, but using automated methods, machine learning techniques to automate this. And we sort of had two research tracks. We had one where we sort of took an opaque box view of the database system where we said we can't change the internals. what can we do just with what the APIs that the system exposed so like basically how do you optimize automatically existing databases my sql postgres oracle and so forth and then another track of research was if you build the data system from scratch assuming it's going to be controlled by machine learning uh you know tools or now we call agents how would you design the system slightly different um and a lot of things we learn from trying to optimize my sql postgres we end up end up building in our own system.

33:13So the challenge always was then for these automation tools was just having enough training data of like production databases and being able to take the things you learn optimizing maybe one deployment and apply it to another. Like as I was saying before, most people will have in, you know, they have a staging or development environment and then they have the production database. And so you obviously don't want to try random things on the production database that may cause you to slow down and degree of performance while you're trying to figure out how to tune it. So you would vet things on the production, sorry, the staging database and then try to apply to the production one.

33:49But oftentimes like it's never the same hardware, never the same workload. So that was a big challenge we were always facing, just getting enough training data to feed into the models that can then make good decisions on the production databases. And then the LLMs show up and that really changed how you can approach the problem because they are basically trained on blog articles, documentation, best practice guides that are all available on the internet of how to tune these databases. And so on the research side, what we found is the LLMs can get you maybe 85 % of the way there in tuning certain things.

34:24And obviously there's weird corner cases, bespoke algorithms can handle those. But like our models oftentimes would take hours and hours to train, assuming you had enough training data to produce like the pristine optimal configuration. But the LLMs can come in just like in 15 minutes, produce something that was good enough. And that's good enough for most people. So are we there yet? Are we in a world where database can largely be sort of self-tuned, self-optimized? I mean, the answer is yes, because it depends on how much improvement you actually want. Like I'm saying, like the LLMs can get you 85 % of the way there.

35:01Is there always more performance to squeak out? Yes. And some people are always going to care about the things. and then therefore the automated methods we built in the past would matter a lot more. But for most people, actually one of the things I was surprised so much was like when we had the startup and trying to do this auto-tuning stuff for Postgres MySQL is how many people - That was auto-tuned, right? Auto-tuned, yes. But it's how many people were running with the out-of-the-box configuration from Amazon or Google, like in the cloud platforms. And they would tell us, oh, we thought Amazon was tuning this for us.

35:29I'm like, no, they're not, right? Like, so there's enough people that are maybe running with a DOL configuration, which is that thing's just terrible, don't do that, where like an LLM could come and take care of some little hanging fruit and provide some meaningful improvements for people in a short amount of time. So in the rest of the software world, we've seen the nature of the job of a developer profoundly change. If you're a student at CMU today and you're super excited about the world of databases, so yes, we can work for the ClickHouse or CockroachDBs of the world, But outside of that, what is a job today that requires deep knowledge of databases?

36:06If we're in a world where agents are going to be like calling them, managing them, and then the database themselves will be self-driving. So I would say like, so what I would tell my students always was like, for my courses, like even if you're not going to go off and become a database system engineer, like go work on the internals of ClickHouse or Cockroach or Postgres. At the end of the day, everyone's going to interact with the database system. and the, if you understand what the internals of them, how they're implemented, how, you know, what the data system is trying to do or not do for you for your given queries, you're just going to be in a better position to understand what's going on in the world, in tech stacks.

36:44Now, do you need my course to figure that out? No, I'd be naive to think so, that like the agents, you know, they've sucked all my stuff in so they can regurgitate everything I would teach anyway. So, but at the end of the day, again, whether you're learning from a traditional university course or self-taught or having LMTG things, if you understand what a database system is trying to do, then it just sort of removes lots of mysteries and it helps you understand like what, you know, what's going on in your application, why are queries running slow or not running slow? Just, you're in a better position to understand what's going on.

37:16And so I, you know, if you would, if you, if you pursued a computer science degree or engineering degree and focused on database management systems, I don't think I think the era of like you're going to write your system from scratch by yourself I think that I'd be naive to think that that's still going to be around but at the end of the day the database companies are still hiring people to work in these things because you need somebody needs to understand what the agents are actually doing it makes sense of it but to fully ask the question like we're in an era where there's going to be just no humans in the loop in the way databases are managed and deployed I would say the traditional role of a DBA as we've known in the past, I think that's going to be relegated.

37:58And a lot of that can be automated. It doesn't necessarily mean those roles go away. They just now get to pursue more higher-minded activities. Like data modeling is always important. And again, agents can do a lot of that too, but you still need someone to understand like, yes, does this data model capture what our organization or business is trying to represent in database? All those things are super important still. Does someone need to be tuning the knobs or picking exact indexes for tables? I think that ship's the ID don't. It can do all that. Great. To switch topics, a lot of people in the database world, I assume pretty much anyone is very familiar with your work, but for people who are not, so you have been a tenured professor at CMU.

38:40You have had very popular classes. I think part of the one beautiful thing that you did is that you took a lot of CMU courses that you were teaching and then you put them online for free? So when I started at Carnegie Mellon, I was the only data assistant professor there. There was another professor there, but he did more like graph mining, data mining stuff. And so when I started in 2013, I was like, okay, well, I got to figure out how to get tenure. And competition is not the right word, but I'm competing against MIT, Stanford, and Berkeley, and I'm the only data person there. So like, all right, well, let's just put everything for free on the internet and help promote our research, what we're trying to do.

39:21Um, it also had the side effect of like, I would end up being more prepared for classes because I would, not that I was like a fun at home anyway, but like I was like, make sure I had my stuff together because I knew it was going to be recorded and watched because I don't want to say the wrong thing. Uh, and I would be more professional. I would say less crazy things, which is people are like shocked when I say this, that like my course even now is considered watered down. Like even for them, that's, that's bizarre. Um, so yeah, like it was, and like, obviously the benefit is like not everyone can go to Carnegie Mellon University.

39:50It's not cheap. It's a private school. None of them can get in. But why should that education not be held back from other people? It doesn't cost me anything. I just put it on YouTube and make everything available to everyone else. And we were joking about Wu-Tang Clan at the beginning of this conversation. I think I heard or read somewhere that you had a DJ spinning Wu-Tang Clan at the beginning of class. What is that story? It started in 2019. It was like, all right, well, let's have fun with this. And, you know, when you set up the cameras and things like that for your for the lectures, there's obviously time to set things up the wires.

40:28You know, we had to set all this up, too. Right. There's time. So like, all right, well, this is awkward silence where the students are coming in. They're staring at you. There's nothing really going on. There's nobody saying anything. So, like, let me get a DJ to sit next to me and just play beats and make me play music next to me the whole time. Right. And then, like, you know, then you start talking to them during the lecture and you find out, like, you know, they live pretty interesting lives. Like one guy, you know, was had a bunch of ex-girlfriends trying to hook up with him. One guy would loan a bunch of money to people he shouldn't be loaning to.

40:55So just like we just talk about it in the class. Plus databases. As one does. As one does, yes. And then I think one year we had, I did a little joke where oftentimes the top database conferences are always at the beginning of the semester, at the end of the semester. So I have to travel. So like the first week of classes, I'll be traveling to go to a conference. so you don't want to cancel class because it's super important for students to know what the course is going to be out the first week because they're trying to figure out classes they want to take so i would i would film it remotely so one year i was i was in la for for a conference and then at the very end of the lecture because i filmed it i was like oh by the way the most important things you need to know about databases and i just listed all the members of the wu-tan clan on the first album plus capadonna who was in jail at the time and i said this is the most important thing you have to know about the databases and then when it came at the end of the semester of the final exam, the very first question was list all the members of the Wu-Tang Clan on their 36 chambers plus who was in jail and you have to get the exact spelling.

41:52And if they got that question right, they would have got 100 % correct on the exam. Yeah, not killer, but killer. That's right. So someone got that wrong. They missed the H when they should have had it. So no one actually has ever got that. And I would say I can't do it again because students are expecting it. Okay, amazing. So that takes us in some way to ClickHouse and ClickHouse Labs. You joined ClickHouse recently to start ClickHouse Labs. Yes. So why start a lab in a commercial company versus doing that in academia? I mean, without going too much in politics, the nature of research in universities is kind of tough right now.

42:33The funding in the United States is not what it used to be. there's also a larger question of like what does it mean now to have a phd student when an agent can kind of do a lot of things right do you need to have as many phd students working on stuff when like an agent can produce things and work with me as the professor um to write papers things like that so i said i mean so there's certainly value still educating students and i like doing that but just wasn't clear to me like how would i raise money uh to have many students that I would want. So I had some companies reach out to me about like, you know, hey, can you, instead of going to leave and doing some interesting things with us.

43:16But it was always a bit more like, hey, you want to come be an engineer with us or like kind of water down versions of what I wanted to do on the research side. And then when I talked to the ClickHouse people, it almost seemed too good to be true because I was like, hey, you know, you know, they're like, hey, come do research with us. I'm like, okay, but this is what research is. You understand this? They're like, yeah, yeah, go do this. I'm like, okay, do you understand? Things might not always pan out correctly because it's research. I don't know. Like, yeah, great, do this. And it's insane because they're, as you know, they're not an early stage startup, but they're a startup.

43:55They're not a public company. And normally you only see companies, at least in the database world, set up research labs when they already get established, right? And for them to take this kind of risk or to have the luxury of having someone like me come in to do peer research is amazing. And they're very serious about it. So the opportunity almost seemed too good to be true. And so far, I'm two months into this and it seems to be working out. I'm sort of in this observation period now where I'm going through and understanding the stuff that they've built so far because they haven't really published or written about what they've done.

44:32They have some blog articles, which are super interesting, but they've done some amazing work that I think, you know, I certainly can't take credit for doing, but like they've done some amazing work. And my job right now is sort of helping them turn those into publications we can disseminate and put out into the world, as well as start ramping up longer term work exploratory things. To be very clear, like even when I was at the university, you know, in database systems, my work is very much applied. So it's not like I'm doing theory work that has no one, you know, only 10 people in the world can understand.

45:01and it's not directly related to anything that's going on. The ClickHouse, the kind of stuff I wanna do is directly relevant to what ClickHouse wants to do. Not just on the ClickHouse system itself, but also now they have a Postgres offering. There's a bunch of stuff we've done in the past on Postgres and now we can start getting, looking at real data, trying to put some of these things in production workloads and help people put things out there. So that, to me, that's like super exciting to have like direct impact of like, instead of me writing the paper and then hoping someone comes along and takes it and adopts what we're doing, we can do the research and evaluate whether it's a good idea or not on real workloads, on real production systems.

45:43And if it does make sense, then we can push it out in a short amount of time. So that part is super, super seductive to me that I had this opportunity. Okay, fantastic. While we're at it, let's talk about ClickHouse a little bit in which, for disclosure, we are very proud investors here at FirstMark. I think I read somewhere that in 2016, you were concerned that ClickHouse was possibly vaporware because it was a little too good to be true. Yeah. Can you unpack that for us? Yeah, so as you know, like I mentioned, my database is my job, I think as a researcher, trying to understand what else is out there.

46:22Because database is a really interesting research area because not only am I, again, using the term competing loosely, I don't mean that in a pejorative sense, but you are in kind of competition with other researchers trying to get ideas out and published. So not only am I competing with other researchers at other universities, you're also competing against the big tech companies, the Microsofts, the Googles, and Amazon of the world. Plus there's all these startups that have their own database systems. There's not a lot of operating system startups. There's a lot of database system startups, as you know, as an investor.

46:58So my job is trying to figure out when a new system gets announced to see like, what are they doing differently than my own research? What are they doing better? What can I learn from how they approach the problems that they're trying to solve? And so when the announcement of, or the release, the unveiling of ClickAlice in 2016 came out, I was like, I know how hard it is about a data system and for this thing to appear from nowhere, out of nowhere and have like, have all these capabilities, like the vectorized execution, the columnar stuff, the compression things, the compaction stuff, it almost seemed too good to be true.

47:30Or it's a fork of something that already exists. But at the time in 2016, there wasn't an OLAP engine that was open source that would have all these capabilities. So that threw me for a loop. So I just assumed it was fake. And then sure enough, it's real, obviously. It has a lot of benefit. So what are some of those benefits? In particular, it's very fast, right? It's very real time. Why is that possible? Why do databases typically struggle with that, especially analytical databases? And why are they able to do that? So I would say the architecture of ClickHouse, the core fundamentals is by 2026 standards is not novel.

48:13By 2016, it certainly was. The nature of like you can store data in this columnar layout. So it's storing all the attributes all the data for a single column together contiguously versus like in a row store, you store all the values for all the columns of a single tuple contiguously. Like storing things in that manner, using vectorized instructions and CPUs to process multiple pieces of data at the same time within one single instruction versus like having to do four loops and run things less efficiently. The built-in compression mechanisms, the uh the way they do using a log structure storage where you're appending a bunch of changes and then because you want to ingest as fast as possible then eventually in the background you'll compact it and store it in a more efficient manner a lot of that those ideas uh of the core architecture come from the work done at snowflake and prior to snowflake there was another system called vector wise or x100 sorry the money to be x100 which then became commercialized as vector wise from CWI which is the same school where DuckDB was built so a lot of the ideas that people have been developed for these column store systems and little systems and real-time analytical systems have been sort of floating around but there nothing was open source in 2016 this as far as I know that did all these things so when click outs came out of the gate like hey we have all the stuff based on all this research that people have done before it was amazing right and since then you know duck db has something similar pullers from the guys in amsterdam firebolt started off as a forca click house and they rewrote a bunch of stuff inside and now they have all these things like databricks has their own version engine so everyone has this sort of these this architecture that is predicated or based upon the work done from snowflake and and the vector wise but now but again 2016 that was super novel now it's sort of table stakes And one of the things I think ClickHouse has done really well over the years is just keep improving the performance even further and expanding what workloads they can actually can support.

50:22And what use cases are you seeing for ClickHouse from the inside? What do you see customers do? So I think the going back to the agent stuff, the agent stuff seems really interesting, too, that like people are using this to observe the information, the telemetry that these agents are generating and be able to react to them in real time and ask questions about them. there's a bunch of stuff done on the financial markets as well fraud detection again anything where you want to be able to ingest data very quickly and then ask questions about it complex questions about it very very quickly and get back things in milliseconds rather than seconds like that I think the combination of doing those two things is puts ClickHouse in a unique position and ClickHouse has been on a journey to expand its product offering right so it started with this very powerful OLAP Palenet called Real-Time Database, and now it does.

51:14It bought LengFuse for LLM observability, bought other things. Like, how do you, from the inside, understand this evolution? I mean, does it all fit together? I mean, somebody asked me, like, why did I join ClickHouse? Again, I'm only two months into this, and it's kind of like asking, like, you know, like, you just got married, and somebody asked you, why did you choose your wife or husband? I'm like, oh, because they chose me, right? Like, uh, it's a bit more than that. No, like honestly, before I decided to do a ClickHouse, they were doing things at the business level. Like, so this is the ClickHouse incorporated, not ClickHouse system.

51:50They were doing things at the business level that I would have done if I was running a David startup, like they were, uh, like having a postcard offering, not just a single, you know, OLAP engine. That's really good. Not starting in the L2P space, having the, the, the monitoring, the visualization, the now, the agents and the LLMs. They're doing all the things to expand out different verticals. They're built on their platform. To me, they all make sense in tracks. Maybe segueing into the states of the database market in 20 Raysings. We've alluded to a bunch of this already, but I'd like to put it all together.

52:35So one thing that ClickHouse has done, as you mentioned, was adding a Postgres service, a managed Postgres service. It seems that it's a clear trend. So Databricks bought Neon, Snowflake made an acquisition. Crunchy last year. That convergence of analytical databases and transactional databases, is that the future, is that driven by commercial and business reasons so you can sell more to the same customer? Or is there an industrial sort of product logic to it? But there's two things. It's like, should a database company offer with a OTP transactional operational data system and a OLAP system, or at least whether or not they're separate systems or not, that's up for larger discussion.

53:21Should you do that? Yes. I mean, going back to what agents allow you to do, like, obviously maintaining these things is still a challenge. but the bar of entry of deploying a Postgres offering has certainly been reduced. Another conjecture I have in my mind is like, is it better for an analytical company, a startup that starts with an analytical database to then later on add an OLTP offering versus an OLTP company then later add an OLAP offering? um i think the again i realize i'm saying this and i'm biased because i'm at click house but like you look at like what databricks did you look at like what's what um what click house has done to me that appears that's the right path to do this like if you want to start if you want to start a new data startup start doing analytics first get traction there then you can then add the o2p offering um uh but i can't prove why just from the from the business perspective it seems that's to be the smarter play.

54:26Now the question is like, okay, should you have a single API, a single interface, a view, a single logical endpoint that allows people to run transactions and analytics on what is perceived as a single database instance, or should you have sort of be separate services? The Clickhouse right now is separate services. But they have a fast path to get the data out of the OLGP side from Postgres into ClickHouse. What Databricks announced this year was their LTAP engine or LTAP story for their LakeBase where you can run your transactions on Postgres or LakeBase or Neon and then have the OLAP engine be able to read that data directly so that you don't have to make a, you know, two copies of it in the way ClickHouse does or other systems do.

55:23So that idea is not new to have like this, this sort of two engines, but like one copied the data. There was a previous startup in the 2010s called Splice Machine, which actually I was an advisor for because the guy, the founder was CMU alumni and he asked me to be, to be an advisor for them. But they were, cause they were running HBase plus Spark SQL. But they had a single copy of the data that was a row store. um the i mean people have been wanting these htap systems or these hybrid systems since the very beginning um it's just the always the challenge has always been like how do you you know how do you how do you reconcile the fact that like some of the data might be still in the row store versus the column store and and like the major commercial vendors like oracle sql server they'll they'll store two copies one the row store and the com store it's called fractured mirror approach um and they have an internal mechanism to synchronize these things but the challenge has always been why these this sort of hybrid approach has never taken off is because the stakeholders at organizations or companies for these two different sort of categories of workloads have always wanted their own best thing like the O2B team that people are running the application the operational side they don't want something that's kind of does okay at operations and can do okay analytics they want the best operational data system and for better or worse that's Postgres now right and best is not always in terms of performance could be a variety of reasons why it's considered the best.

56:50The same thing for analytics. You don't want a system that kind of does okay in analytics and does okay on operational workloads. I want the best analytical system. And so that's always been the business challenge or go-to-market challenge for these hybrid systems. I think though Databricks might be in a good position to potentially pull this off because they already have that sort of market from the analytical side, and machine learning side, and the data warehouse side. And now you're just adding in this OTP side. And so ClickHouse could potentially pursue the same thing. That's getting kind of the weeds of data system architectures.

57:28But I think everybody's always wanted this. The challenge, though, often isn't just, it isn't always just pure engineering. There might be the organizational reasons or human reasons why you can't achieve this. Yeah, super interesting. So to play it back, Like you could abstract away the complexity to the user, meaning that you could have presumably an NLM that translates your query. Like a router, yeah. Yeah, into exactly a router. However, from a fundamental architecture perspective, it's very hard to combine. And from an organizational perspective, it may not make sense because people want the best of breed.

58:03Yes, but Postgres is the best of breed now in many cases. So, like, betting on your front end is a Postgres deployment that is compatible with Postgres. That might overcome that issue. So, to talk about other parts of the database market, we talked about vector databases. So, like, is that thumbs up or thumbs down? What is thumbs up, thumbs down? Like, in terms of, like, is that a good business to get invested in? I think it'll be around now that, you know, everybody else and their brother has a vector search capability. One of the things that happened before when I was a professor is like, I would always get, you always hear rumors about who's doing well, not doing well through a combination of like either the investors or like former employees or students that maybe go to internships or whatever, like, or like maybe interview some places and they come back.

58:50So you get sort of bits of information from, from everyone to kind of piece together what, what the data landscape looks like. Probably now we didn't click us. Now I see, I see everything like as an investor, you see everything too. The one vector database company that I know is doing very well is TurboPuffer. And they are hyper-specialized in doing vector search at a cost-performance ratio that's much better than everyone else. So I don't think that the vector database is going to go away. I think that they'll evolve in two ways. they'll have to become either a sort of a general purpose system like a Postgres like a MySQL where they become the system of record where you're storing your you're storing like the original tuples plus the embeddings or the vectors for them or they become like an elastic search where there's like a separate system where they have a copy of the data that's being pulled from the operational side and in that case they can live sort of comfortably as being this like additional thing you add on.

59:56And if you want the raw best performance of vector search, some cases you may have to go to one of these specialized systems. So I don't think that's going to go away. I just don't think, I've seen predictions of like, oh, Postgres is going to die at the hands of a vector database. That's not happening. That's not happening. Very much the opposite, right? Yes. Graph databases, we mentioned at the beginning. So, you know, not to pick on them, but like Neo4j has been around for 20 years now. Sure, yes. And this was supposed to be the moment, right, for graph databases, AI. So what's happening there?

1:00:27I say I have an outstanding bet with somebody on Hacker News where they said that by the year 2030, the graph database market was going to be, was going to overcome the larger in the relational database market. And if this becomes true, then I will wear a shirt that says I love graph databases. And I will use that as my driver's license, my university ID. I'll put it on my website to the day I die, right? I'm pretty comfortable. it's 2026 we got four years to go i that this is not happening um no it's always been a niche market and i think that because my perspective on the research side the research shows that if you do certain things in implementing the engine uh which click house does do duck db some of does does some of this as well there's certain there's things you can do that allow you to do the traversals of grass which essentially just joins self joins on the table you can implement those things very very efficiently uh and you can easily outperform neo4j and that's kind of a kicking that's like like neo4j is like saying you're faster neo4j is like saying i'm faster than you know somebody maybe like that's that's you know that's in a wheelchair right you can run fast that's it's it's a low blow so but i'm just saying that all the graph databases i think like even the best ones you're just not going to there's a system that has a bunch of these optimizations that are that are in the research and actually appearing in some of these systems now.

1:01:46You're going to lose. What you will lose against a graph database if you're doing the graph traversal with the client side and server side, meaning like I got to figure out what the next node I want to go look at, go back to the client and that side's the next node to go traverse. If you're doing that back and forth, yeah, they'll beat you guys. But like I said, the SQL standard now supports property graph queries. Oracle has this. They were a big pusher of this extension to SQL. It allows you to do that traversal on the server side. So like graph database is, I think, a horrible idea. There's no reason why anyone would actually want to use them.

1:02:18GPU databases? Yes. I know you have a special interest there. There was a cycle when the generation appeared then went away. There seems to be a renewal. What is a GPU database and what is your prediction? So a GPU database is a data center system where the execution end for queries is all floated to a GPU running on PCIe or running in the same box or another box. so I mean the history of people trying to build accelerators for data systems goes back to the beginning of data systems the 1970s they were called data machines so people would build specialized hardware to run sorting and query execution operators and that obviously died out in the early 1980s because by the time it take you to like design and fab new specialized hardware you know intel or motorola put out the next cpu or the hardware got better and just the gains you're getting went away so So hardware accelerators for databases basically died out in the 1980s.

1:03:14There wasn't a lot of activity in the 90s. 2000s, you saw sort of the rise of people trying to do FPGAs for databases. And every so often that comes back now. Some of the cloud vendors do a little bit of these things, but usually like to filter things on the NIC, on the network side of things coming in. So for GPU databases, again, there was a bunch of systems in the 2010s that were trying this. we did a seminar series at the university. We invited all the GPU databases guys come and give talks about, you know, what they were doing, how they were, you know, why they were faster than existing systems.

1:03:49And the big challenge at the time was like, with those systems, you had to put the entire database inside the memory of the GPU. Because if you had to go back up through PCIe, it was just way too slow. And a bunch of those startups sort of fizzled out. Some of them are still around, but they're sort of specialized for doing visualizations. and then there was in the last year or so NVIDIA has basically gobbled up a bunch of these GPU database companies that were kind of like struggling along and I was a I was an advisor for one of them called Voltron but they also picked up HeavyDB and so NVIDIA is all going all in on this now so it remains to be seen whether like the idea that you're going to build a CPU only database system like long-term, whether that's going to still hold.

1:04:42I've heard in mixed reports, like this is public. Microsoft has, you know, they have offerings now in the cloud that can be accelerated, you know, your data system can be accelerated by GPUs for analytics. Another major database company, I can't say who they are. They looked at the economics of GPUs, decided it wasn't worth it. So one of my former students now is a professor at University of Wisconsin. they're now on leave at nvidia they have a project called series db which is not necessarily a new data system but it's a layer in between an existing system and like the cuda and so they supports like you know taking duck db queries and running that down on the gpu i think they can do this in doris or star rocks data fusion and so at click house we've been potentially looking at this as well but it's research i don't like it's interesting to see whether how much you have to do translation between how ClickHouse expects things and how CUDA wants things to be the data layout and so forth.

1:05:40How do you organize memory or share memory between these different components? TBA. Remains to be seen whether this actually makes sense. But certainly, there's a lot of research energy behind this. And publicly, I can say this, like NVIDIA is obviously pushing this because it'll sell more GPUs, right? Because, you know, it's hard enough to get new CPUs. Everyone's compute bound or memory is hard to get. The computing hardware is very expensive. of hard to get now, and GPUs of all the things that's the most expensive hardware to get, and now you're going to say your entire database is going to run off GPU?

1:06:11I don't know if that makes sense, at least in the short term. But if the performance improvements are quite significant, and some of the research shows that it is, maybe it makes sense. Is there an emerging category or maybe a niche somewhere within a category that people don't talk about enough yet? Of databases? Yeah. I mean, you can always build new data systems for new hardware, and but my track record on this is terrible in terms of like uh we've done a bunch of research on experimental hardware and it always gets canceled or like it's even not that experimental it's like you know intel had this optane persistent memory stuff we did like we did a bunch of research on building systems for that because like if you assume now your d-ram is persistent you know like i mean like you pull the plug you don't lose anything that changes how you fundamentally build a data system we did a bunch of work on that and then intel killed that product line we were doing another research on uh um processing and memory hardware so think of like d ram sticks with like cpu cores directly on the on the dim so the d system now can say okay instead of pulling things from memory printing into my cpu caches and then i can compute things on them i'll just send the query down to the dim itself and run it there we were doing a bunch of work on this on this thing called op mem that got bought by qualcomm and got killed last year uh And so that didn't work out.

1:07:28So there's always a bunch of work you can do on data systems or new hardware. I would say that, actually, I don't know the answer, right? This is one of the things I'm trying to figure out at ClickHouse. And we talked about this in the very beginning. Are agentic workloads significantly different than what humans or what existing applications do now? And if so, why or how? and how would you change maybe the development of a data system to take a better advantage of this. That remains to be seen how that works. I think there's always a bunch of problems in query optimization that I think are interesting.

1:08:06That remains the hardest part about data systems. Incremental materialized views, another big challenge. But these are not like things that no one else has thought of. People have been trying to do these things for decades. So I think the agendic stuff is probably the most, interesting and relevant thing to me right now is like, what changes with these workloads? What changes in the system architecture? And to be honest, I don't know the answer. I just haven't seen it yet. I'm asking because it generally feels like the database market is a specific moment in its history, meaning that there was an explosion of activity in the 2010s.

1:08:46There was, you know, SQL versus NoSQL, that whole evolution. Then there was the emergence of Databricks, Snowflake, now ClickHouse. But it seems that things have slowed down a little bit in terms of explosion. I guess, you know. Stagnant. But we've been through this trend before, right? There's a lot of activity relational databases, 1970s, 1980s. And in the 1990s, again, people sort of, you know, the market sort of solidified around these major enterprises. the oracles the you know the ibms teradatas um and then if you know if your only viewpoint of databases were from from those kind of companies and yeah it looked like it was been stagnant for years um but as you said a lot of activity in 2000 2010s um i mean relative to ai then everything looks stagnant because there's in the history of computer science there's been nothing like that before like it's just like you know taking a cheetah giving a bunch of cocaine and putting in a Ferrari.

1:09:45Like the amount of speed that people are developing in these things is insane. So everything looks slow or dead or stagnant to that. But at the end of the day, I think like the volume is going to matter a lot. I think that one interesting question is to your point of like cost and efficiency, like squeaking out the best you can, the best performance you can get for the hardware that you have, trying to reduce that cost. That's always an interesting challenge that you could pursue. But like the end of the day, I don't think there's going to be a massive change in what data looks like that requires us to throw everything away that we've known about databases.

1:10:27In the same way, like you wouldn't come up with a new notion of arithmetic or mathematics to replace one plus one equals two. The relational model itself is the foundation of how you want to represent data. And it's just you can you can vary the implementations of that. And so there's certainly a lot of work to make these systems more efficient for this. But I don't think you're going to throw everything away. The agents need some kind of database system that you've never even conceived of now. At the end of the day, it doesn't make sense. So I don't think that part changes. I think, like I said, always new hardware.

1:10:59I think there's certainly improvements that we've done for SQL. There's always going to be people trying to replace SQL. I think that might be a lost cause. although SQL could end up being like how in the same way that like you know people don't write assembly anymore SQL might end up being like that because Texas SQL works so well I think the agentic stuff is super interesting and I think getting better performance is always going to be at least from my perspective a fun challenge you can imagine a crazy world where you say I don't need a general purpose data system anymore for every single application I want to vibe code exactly a data system that does this for this one thing can then be hyper specialized you kind of do this now with code generation uh just time compilation for for some aspects of queries and some systems do that like house postgres uh umbra out of from the germans like hyper specialization and making that be sustainable might be a bigger research question going forward so it's a this i don't know if it's a paradoxical kind of situation but on the one hand it's a bit of a stagnant industry right now in terms of evolution, at the same time as we've hopefully established through the conversation, the layer itself is as important as ever, which is one of the reasons why your friend Larry Ellison is the...

1:12:21He owns a Hawaiian island, right? Always close to the richest man in the world, or was it? He was. As I said, he's back in the eighth. I mean, Oracle is a lot more than just a database company, but he's still the core product. I mean, headquarters is the shape of a database. Yes, yes, yes, yes. But if nothing else, that shows the fundamental importance of databases in the... I would say no one is trying to make a serious attempt to replace Linux, right? I mean, yes, there's niche operating systems for different environments, different hardware and things like that. But no one's trying to build a significant scale replacement for Linux entirely.

1:12:59Freebase B, that predates the BSD error from Berkeley. It predates Linux, so that's why it's still around. But for databases, there's always new ideas where people think they can do things better than others. So I wouldn't say it's stagnant. I would just say that a lot of the energy is going to be focused on postgres in the short term. And there are certain things we do to improve it. But meanwhile, I still think there will be these sort of specialized engines. And I don't know what the next workload is. Again, it's not clear to me agentic workloads are significantly different, right? because they're modeling things that are how human design applications.

1:13:38Like the vector lookups, that's significantly different than what was in the past. You needed additional operators. You didn't need additional indexes to do those things. It's not clear whether, I don't know what the next thing is, but there will be something. There always is. So maybe to finish on that. So the next five years, so we don't know necessarily what that looks like. But so in the meantime, does it mean the current company, the click houses of the world, like just keep getting better and established because the fundamental need exists and that's not a new wave of smaller startups. So when you say better, though, like there's two notions of better.

1:14:10There's like, can an existing query run faster? Yes, Clickhouse has room for improvement. We can improve that. Other stuff is going to do the same thing. But like I said, the architecture, the high level of what Clickhouse is doing is similar to what Snowflake did in 2013. Databricks is basically copying some of the existing ideas as well. Like everyone is kind of doing the same thing, at least for analytics. And what really matters, and one of the things that Snowflake did right, was part of the success, is like, it's the stuff around the database system, like the user interface, developer experience, like, you know, building to ingest data, interoperate with other things.

1:14:45That part, they did really well. So it's almost like the things around the scaffolding of the foundational of a database management system, that actually matters a lot. And one of the things that ClickHouse is actually, you know, this is not, for me, it's not research, but this is one of the things they are doing better over time. It helps expand the reach of what you can use the system for. So the core kernels of the system, like that certainly be improved, but the fundamentals of what ClickHouse is doing versus other systems, like at the smallest level, they're pretty similar. But the stuff around it matters a lot.

1:15:19And I think ClickHouse does some things well, things can do better. Snowflake does some things well, can do things better, same as the Databricks and the other guys. Well, thanks for spending time with us. congrats on the new-ish job that you also described in a rap analogy, right? What was it? I mean, it's like, when you look around the jewels, it's like taking LP and Killer Mike. Those guys were established on their own. You put them together, you know, it's like people putting peanut butter and jelly together for the first time, right? So like, I like to think me and Klikowski together is like that.

1:15:54Okay. Well, this is now officially on the record, the most hip-hop reference-heavy episode of the Mad Podcast. I'm glad you found that in there, in the blog article. That was my... It wasn't a test. That was my... Because, you know, I wrote the blog article. I was floating it out there to see what Clickhouse would be okay with. Obviously, I didn't talk about Larry Ellison in there, but, like, you know, I want to see, like, hey, you know, like, if you get Andy, you're also getting other baggage. All right, Andy, this was fantastic. Thank you so much. Yes, thanks, Matt. Happy to have me. Hi, it's Matt Turk again.

1:16:27Thanks for listening to this episode of the Matt Podcast. If you enjoyed it, we'd be very grateful if you would consider subscribing if you haven't already or leaving a positive review or comment on whichever platform you're watching this or listening to this episode from. This really helps us build a podcast and get great guests. Thanks and see you on the next episode.

From the publisher

AI agents are becoming the biggest users of databases: creating them, querying them, and sometimes deleting them. Andy Pavlo, Carnegie Mellon's database professor and now VP of Database Research at ClickHouse, explains what changes when billions of agents hit the data layer, and why most of the AI world's mental model of databases stopped at vector databases and RAG.


Andy's CMU courses taught a generation of engineers (and, it turns out, the AI models); he writes the year-in-review on databases the whole industry reads; and this summer he joined ClickHouse to found ClickHouse Labs. We cover why vector databases were "just an index," what it means for an agent to create a database, why agents could mean 10 to 100x more queries, whether files or databases should hold an agent's memory, how text-to-SQL went from 60% to 99.5% accuracy, why 60% of open-source databases now have commits from coding agents, and what ten years of self-driving database research taught him. Plus ClickHouse, Postgres, the vector/graph/GPU database verdicts, Larry Ellison, and the Wu-Tang Clan.


Disclosure: FirstMark, where Matt is a General Partner, is an investor in ClickHouse.


(00:00) Cold open & Intro

(01:21) From vector databases and RAG to the age of agents

(04:09) Neon's stat: agents create 80% of databases?

(07:25) Why agents keep deleting production databases

(08:19) Guardrails: the toddler-and-stairs rule

(10:51) The four eras of database volume: 10–100x more queries

(15:10) Agent memory: files vs. databases ("everything is a database")

(18:24) Which database do AI models recommend? The new SEO

(19:25) "It cites me back to myself"

(23:14) MCP for databases, and text-to-SQL from 60% to 99.5%

(27:09) Trust an agent the way you'd trust a junior developer

(27:47) Can AI build an entire database? Opus 4 and the CMU projects

(29:57) 60% of open-source databases now have AI commits

(30:43) Ten years of self-driving databases, Peloton to today

(33:52) What LLMs changed: 85% of the tuning in 15 minutes

(35:42) Should anyone still study databases?

(38:27) Free CMU courses, the DJ, and the Wu-Tang final exam

(42:09) Why start a research lab inside ClickHouse?

(45:53) Why ClickHouse looked like vaporware in 2016

(47:46) What makes ClickHouse fast: columns, vectors, Snowflake's lineage

(52:22) Why Databricks, Snowflake and ClickHouse all added Postgres

(58:15) Vector, graph and GPU databases: thumbs up or down?

(1:08:34) Is the database market stagnant? "A cheetah on cocaine in a Ferrari"

(1:10:14) The relational model is arithmetic; SQL as the new assembly

(1:11:59) Larry Ellison, Linux, and why databases still matter

More from The MAD Podcast: How AI Gets Built — with Matt Turck

All episodes

Listen to the episode