Host: Yeah.<\/strong><\/p>\nKarthik Ramachandra: Yeah, this is one of the top-tier database journal and conference. And then in 2018, I moved back to Bangalore, and in the same year, later in the year, we publicly announced Froid as a feature of SQL Server 2019. And we allowed users to start using a beta or a preview version of this and we have received like really positive feedback and response from users who have tried it out and that\u2019s where some of the users said that it\u2019s now magic and all that, so those are, again, responses that we got over the internet or tweets and other social media.<\/p>\n
Host: Yeah.<\/strong><\/p>\nKarthik Ramachandra: So, it took a while but, you know, I think we are at a point where we have made some significant progress in that direction.<\/p>\n
Host: Well, we\u2019ve kind of buried the lede here, as they say in journalism. And we\u2019re talking about this project called Froid, F-R-O-I-D. Not Freud like the psychoanalyst.<\/strong><\/p>\nKarthik Ramachandra: Yes.<\/p>\n
Host: Although, software problems could put you on the couch\u2026 Um, so tell us sort of high level \u2013 because I\u2019m going to ask you next to get us into the technical weeds \u2013 but tell us what Froid is.<\/strong><\/p>\nKarthik Ramachandra: Yeah.<\/p>\n
Host: Specifically.<\/strong><\/p>\nKarthik Ramachandra: So Froid is basically a framework for optimizing these imperative programs inside of a database system. So, database systems are known for optimizing SQL queries and running SQL queries, but not imperative programs. So…<\/p>\n
Host: Hence the performance gap.<\/strong><\/p>\nKarthik Ramachandra: Yes. So, Froid basically tries to address that gap by coming up with a novel way to optimize imperative user-defined functions inside of a relational database. So that\u2019s like the one sentence description, if you will.<\/p>\n
Host: And that\u2019s perfect as a segue into how you did this. Let\u2019s go into the weeds and talk about Froid in more depth. How, technically, did you bridge the gap between these two \u201cfrenemies\u201d of declarative SQL and imperative UDFs with Froid?<\/strong><\/p>\nKarthik Ramachandra: Yup. So, as I was mentioning, the intuition comes from this paper that we wrote way back in 2014, and the key intuition is that the imperative programming paradigm and the declarative paradigm are in two different levels of abstraction in which you\u2019re dealing with the system. So, in order to bridge this gap, we came up with an automatic and a systematic way to take these imperative programs and translate them into equivalent declarative programs, or equivalent relational algebraic expressions, to be more precise.<\/p>\n
Host: Yeah.<\/strong><\/p>\nKarthik Ramachandra: So, in a sense, we are taking imperative programs and translating them into a declarative form. So now you are in the same world where SQL and your imperative program are both expressed in a declarative form, so now that you\u2019re in the same world, today\u2019s database query optimizers can understand what\u2019s going on inside the user-defined function and also be able to efficiently execute those. So, the key idea, to summarize, is that we show how you can systematically and automatically translate imperative programs into a declarative form, which is relational algebra in our setting.<\/p>\n
Host: Hence bridging the gap between the two.<\/strong><\/p>\nKarthik Ramachandra: Hence bridging, exactly.<\/p>\n
Host: And gaining performance with UDF abstraction levels in a SQL environment.<\/strong><\/p>\nKarthik Ramachandra: Yes, so we have done several experiments on many of our customer workloads as well as benchmarks and so on. And we have seen a really significant, order of magnitude performance improvement because of this bridging of this gap. Mainly in situations where users are having this tradeoff between good code and modular code and performance.<\/p>\n
Host: Yeah.<\/strong><\/p>\nKarthik Ramachandra: With this, now we are able to say that users can still write code in the way they like and maintain all the good programming practices and not compromise on the performance aspect of it.<\/p>\n
Host: All right, so give us an overview of the stats, because they\u2019re pretty impressive. Give us a sort of verbal dashboard, since this whole thing began with a dashboard, on how Froid has performed comparatively against the other paradigms.<\/strong><\/p>\nKarthik Ramachandra: Yeah, as I was mentioning, we have tried Froid on several workloads and even on many of our early adopters who have already tried out Froid have started writing a lot of articles about it where they have done the comparison themselves on their workloads. And it\u2019s very heartening to see others who are trying this out on their queries and UDFs and finding positive results. So, we have seen, like I said, orders of magnitude of up to, you know, even hundreds of times faster, or even more than that in several cases. And also, the other interesting thing is the larger your database is, the more improvements you get in performance.<\/p>\n
Host: Oh, really?<\/strong><\/p>\nKarthik Ramachandra: So, for smaller data sets, this may not even matter a lot, because you\u2019re mainly dealing with a small data size.<\/p>\n
Host: Yeah.<\/strong><\/p>\nKarthik Ramachandra: It starts mattering all the more when you have larger datasets, which is more often the case nowadays, right? So, people have huge databases with terabytes of data and being able to efficiently crunch through these large volumes of data is critical.<\/p>\n
Host: In a short amount of time.<\/strong><\/p>\nKarthik Ramachandra: In a short amount of time.<\/p>\n
Host: Short enough amount of time.<\/strong><\/p>\nKarthik Ramachandra: Yes.<\/p>\n
Host: Can people get this code?<\/strong><\/p>\nKarthik Ramachandra: Yeah, so Froid is available as part of Microsoft SQL Server 2019 beta, or public preview release, which is available for download on the Microsoft SQL Server website.<\/p>\n
Host: Yeah.<\/strong><\/p>\nKarthik Ramachandra: So, people can download it and try it out, and we are happy to get any feedback or any thoughts that people may have about it. I would encourage people to try this out and let us know what they think about it.<\/p>\n
Host: What\u2019s on the horizon for the future of Froid? What are the open problems still, and how are you tackling them as researchers and, and developers and engineers?<\/strong><\/p>\nKarthik Ramachandra: Yeah, Froid is just a first step in my opinion. There\u2019s still a long way to go. Currently, Froid has some limitations in terms of the kind of functions that it can optimize, right? So, one of the main limitations being we don\u2019t handle loops at this point, like if your imperative UDF has a loop inside it, we currently do not do it. But that is actively being worked upon, and we have some ideas and we have some prototypes that we are building to address that, and that is one of the areas. And the other is also to expand this to a broader set of languages. Currently, we can do this for Transact SQL or the procedural extensions of SQL. But we plan to expand this to languages like C# and Python and so on, which are used in context of machine learning and data science and so on. So, we want to broaden the scope in those directions.<\/p>\n
Host: And those are active research threads that are happening now?<\/strong><\/p>\nKarthik Ramachandra: Yeah, these are active, yes.<\/p>\n
Host: Some people have called it magic, where you are now. What do you go to in the next 20 years?<\/strong><\/p>\nKarthik Ramachandra: (laughter) Yeah, that\u2019s uh…<\/p>\n
Host: Don\u2019t even know.<\/strong><\/p>\nKarthik Ramachandra: Leave it to them to say\u2026<\/p>\n
(music plays)<\/p>\n
Host: This is about the time where I ask the question, is there anything that keeps you up at night? And there don\u2019t seem to be too many looming issues that should scare us about databases, I think. Perhaps there are some things we want to be mindful of as we outsource more of our decision-making to our understanding of data dashboards.<\/strong><\/p>\nKarthik Ramachandra: Mm-hmm.<\/p>\n
Host: What\u2019s your thinking on that? Is there anything that keeps you up at night?<\/strong><\/p>\nKarthik Ramachandra: Well, I think, you know, to put it in a different way, right? Even today, what a database says to a user is, hey, talk to me in SQL, right? And then, if you talk to me in SQL, I can do what you want me to do as efficiently as I can.<\/p>\n
Host: Mm-hmm.<\/strong><\/p>\nKarthik Ramachandra: So that\u2019s, in some sense, a narrow restriction that the database expects users to talk to it in a specific way, right? I think what keeps me interested, or keeps me thinking, is that people talk in different languages and they have different ways to express their requirements. And as a database system, we have a lot of good technology which is built in over the last several decades which have gone into these systems, and I think there is an opportunity to broaden the scope, or the reach of databases, database systems, by accepting that there\u2019s diversity of languages and trying to make the technology of databases reach to a broader set of users who may not be SQL experts, right? So even if I don\u2019t know SQL, I should be able to get the best out of a database system, which is not entirely true today. Froid takes one step towards that. But as I said, it\u2019s still a long way, and that\u2019s something that, I mean, making databases more user-friendly or programmer-friendly in some sense, or, you know, more broad is something that I keep thinking about. And that\u2019s the direction I want to keep pushing through on. Even if I don’t know SQL really well, I should be able to get the best out of a database system. And today, that\u2019s not entirely true.<\/p>\n
Host: So, you may not be losing sleep over it, but it\u2019s certainly something that motivates you.<\/strong><\/p>\nKarthik Ramachandra: Yes, yes. I do get good sleep. It\u2019s not…<\/p>\n
Host: That\u2019s good. Good to know.<\/strong><\/p>\nKarthik Ramachandra: I don\u2019t think I\u2019m losing sleep over it. Yeah.<\/p>\n
Host: So, I usually ask people to tell us about themselves right now\u2026<\/strong><\/p>\nKarthik Ramachandra: Mm-hmm.<\/p>\n
Host: \u2026and how they came to MSR. But you basically covered that earlier on.<\/strong><\/p>\nKarthik Ramachandra: Yeah.<\/p>\n
Host: It\u2019s such a good story. So, let\u2019s get a little more personal here. What\u2019s one interesting thing, maybe a trait, a characteristic, a life event, that people might not know about you that may have influenced your career as a researcher?<\/strong><\/p>\nKarthik Ramachandra: Yeah, one thing that I can say is that I listen to a lot of music, especially Indian classical music. And I also play the tabla, which is an Indian music instrument. And since a young age, that has been my hobby, and it has been with me in inexplicable ways. I think that has sort of enriched my life and also, whenever I want, I get rejuvenation and you know, I get refreshed whenever I go back to music. So, although I can\u2019t explicitly quantify how it has helped my career and our research and so on, I think it has played a very important role in my life as a whole, and I keep continuing to go back to music, especially, you know, I\u2019m fascinated by the intricacy and the depth behind these highly-evolved styles of music, one of which is Indian classical music. And that\u2019s something really fascinating, and I keep getting amazed by it.<\/p>\n
Host: That is not at all where I thought you might go with this, and that is fascinating. There\u2019s a big connection between math and music.<\/strong><\/p>\nKarthik Ramachandra: Yes.<\/p>\n
Host: Drilling in a little bit there, you say I can\u2019t really quantify it, and I love that you can\u2019t quantify it, because not everything is quantifiable\u2026<\/strong><\/p>\nKarthik Ramachandra: Yes.<\/p>\n
Host: \u2026but what do you think? What does your soul tell you that music does for your work?<\/strong><\/p>\nKarthik Ramachandra: See, I think there are hidden connections between all these things that look different on the surface. Again, as I told you, I don’t know what the connection is explicitly, but my gut feel is that there are strong connections. And I don’t know what happens in the brain when you listen to music. I mean, there have been a lot of studies that try to understand this, but I think overall it has a really positive impact, uh…<\/p>\n
Host: Wow.<\/strong><\/p>\nKarthik Ramachandra: So yeah.<\/p>\n
Host: All right, so this has been a great conversation. As we close, I like to ask my guests to share something meaningful with our listeners. This could be advice, wisdom, inspiration, maybe even \u201cthings I know now that I wish I knew then.\u201d Is there anything you\u2019d like to say to would-be database researchers? Because now\u2019s your chance to say it.<\/strong><\/p>\nKarthik Ramachandra: Yeah, so, over the years, what I\u2019ve realized is that database systems offers like a wide spectrum of interesting research challenges. And all the more, as data sizes keep growing and technologies like machine learning and AI are making inroads into everything that we deal with on a day-to-day basis, I think as they become commoditized or democratized, in some sense, I think database researchers have a very important role to play in how it can be integrated more easily into applications and software in general. And so I would like to say that, you know, as a researcher, I think it\u2019s very important to continue to focus on the fundamentals of, you know, principles behind the research that we do, and always keep an eye out for real problems that practitioners keep complaining about, or the problems that they face. Because as researchers and scientists, it\u2019s very easy to get attracted to some intellectually challenging problems. I mean, I\u2019m not saying that\u2019s wrong, but at least, as applied researchers, I think we need to be cognizant of what\u2019s happening on the ground. We need to be grounded by, you know, what are the problems that users face, or what are the directions that these technologies are taking us, and where there are gaps to fill? So, I think balancing this between intellectually challenging problems and practically relevant problems is something which is very important at least for applied research areas, I think.<\/p>\n
Host: Sort of the balance between the solution in search of a problem and the problem in search of a solution.<\/strong><\/p>\nKarthik Ramachandra: Yeah, that\u2019s a nice way to put it, yeah.<\/p>\n
Host: Karthik Ramachandra, thank you so much for joining us today. It\u2019s been awesome.<\/strong><\/p>\nKarthik Ramachandra: It was great talking to you. Thank you so much for having me.<\/p>\n
(music plays)<\/p>\n
To learn more about Dr. Karthik Ramachandra and how Froid is delivering the best of both worlds to database users, visit Microsoft.com\/research<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\ufeff Episode 73 | April 24, 2019 In the world of relational databases, structured query language, or SQL, has long been King of the Queries, primarily because of its ubiquity and unparalleled performance. But many users prefer a mix of imperative programming, along with declarative SQL, because its user-defined functions (or UDFs) allow for good […]<\/p>\n","protected":false},"author":39507,"featured_media":580048,"template":"","meta":{"msr-url-field":"","msr-podcast-episode":"","msrModifiedDate":"","msrModifiedDateEnabled":false,"ep_exclude_from_search":false,"msr-content-parent":199562,"footnotes":""},"research-area":[],"msr-locale":[268875],"class_list":["post-811969","msr-blog-post","type-msr-blog-post","status-publish","has-post-thumbnail","hentry","msr-locale-en_us"],"msr_assoc_parent":{"id":199562,"type":"lab"},"_links":{"self":[{"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-blog-post\/811969"}],"collection":[{"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-blog-post"}],"about":[{"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/types\/msr-blog-post"}],"author":[{"embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/users\/39507"}],"version-history":[{"count":2,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-blog-post\/811969\/revisions"}],"predecessor-version":[{"id":811978,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-blog-post\/811969\/revisions\/811978"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/media\/580048"}],"wp:attachment":[{"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/media?parent=811969"}],"wp:term":[{"taxonomy":"msr-research-area","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/research-area?post=811969"},{"taxonomy":"msr-locale","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-locale?post=811969"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}