MySQL: Smaller, Smarter, Faster — Everywhere

Here's our exclusive interview with the co-creator of the world's leading open source database.

monty_01

Though most Linux fans know Helsinki as the birthplace of Linux, it’s also home to an open source project that may shake up the proprietary database market just as much as Linux has affected the Unix world and the market for operating systems. Named after Michael “Monty” Widenius’s daughter, My (pronounced “me”), MySQL first saw life in 1983 as part of a proprietary application that Widenius wrote for his consulting firm, TCX DataKonsult AB. From the start, MySQL’s focus on speed and ease of use made it an ideal tool for TCX. A dozen years later, when Widenius and MySQL co-author David Axmark released the database under an open source license, they also created an ideal database for the Linux community. Today, MySQL boasts over four million users and the company that Widenius and Axmark started to support its development — MySQL AB — employs a staff of 65.

This spring, MySQL held its first-ever user conference in San Jose, California, where the growing community of MySQL users and independent software vendors gathered to learn the latest about their favorite open source database. Linux Magazine was there, and Editor-at-Large Robert McMillan met with Widenius just after Widenius had announced the alpha release of MySQL 5.0.

LINUX MAGAZINE: When we interviewed Larry Ellison a while back, he told us that he didn’t see you as a competitor. “The people who use MySQL are not the people who would buy my database,” he said.

WIDENIUS: How about Yahoo? Google? Cisco? Alcatel? Of course, Oracle is not interested in those small firms.

LM: It seems that there are some technical things you can do to get to where Oracle is today…

WIDENIUS: We don’t want to go where Oracle is today, because they have a huge product that has feature upon feature that most people don’t need anymore. It’s like Microsoft Office. [Office] has I don’t know how many features, while most people would be happy with just the core twenty. We are trying to do a streamlined server that’s extremely fast and reliable, and can satisfy a big group of the users. We are also extremely optimized for Web use, and Oracle isn’t. So if Larry Ellison says that, he is basically saying that Oracle is not usable in the Web environment. I don’t think he actually means to say that.

At this point, we are not competing with Oracle for the same customers, but we are filling a need that exists, and we are filling it extremely well.

LM: So as things progress, do you expect to be competing more with Oracle, and even outside of the technical realm, are there things that Oracle does that you would like to be doing too?

WIDENIUS: We are doing lots of things with different partners. But what we are trying to do is follow ANSI and make MySQL more standardized. Of course, that means that we are more suitable for a much larger group of applications than before.

LM: What are the most important things, then?

WIDENIUS: For me personally, I have a road map of features. For Marten, [Mickos, MySQL's CEO] it’s a road map for doing sales. For David [Axmark, MySQL's VP of Community Building], it’s a road map to enlarge MySQL’s use in the community. We want to grow and spread and ensure that MySQL is everywhere.

LM: But what are the specific things you’re talking about? With 5.0, for example?

WIDENIUS: 5.0 was released in source code form today. We are going to demonstrate that we have stored procedures — something that people in the press have said we’ll never have because we don’t have the resources to do it.

A year and a half ago, we got an investment to be able to do a little bootstrapping — a little money to prove that we have a product and a viable business idea. By doing that, we hired people who could implement the things people have called for.

So now we’re showing that we have subselects and stored procedures. Of course, there’s some more work to do to make it really efficient, but we’re working on it.

LM: What about triggers?

WIDENIUS: Triggers are next, right after stored procedures. You first want to have a nice stored procedure language, because triggers can invoke a stored procedure. We try to first do things really, really well. When that’s done and we have a building block, then we add a new thing. Even if people have been talking about triggers, we decided it would be better to wait and to do it well.

LM: So, are triggers a 5.1 or 6.0 kind of thing?

WIDENIUS: Probably 5.1. We want to have subselects out, and that’ll take three to six months before that’s in production. And during that time we’ll add as much as possible to 5.0. When 4.1 goes to Gamma [MySQL has four release steps: Alpha, Beta, Gamma, and Stable] then we’ll start doing fixes to 5.0.

We’re trying to cut development cycles to six months. We would like to have a big release with a lot of nice features every six months, but it may be that it goes to one year. Of course, everything is always available, which is a nice difference. We don’t have the same pressures to get a release out — as long as we can get features out. And features come out very, very rapidly.

LM: Are there other features that you’re interested in bringing to MySQL — embedded databases, for example?

WIDENIUS: We have been working in the database world for close to twenty years and we have lots of ideas. The question comes down to what resources we can get and how many features can we get our partners to commit to. Because we’re open source, it means a lot of people know our code and it’s much easier to find a partner or a group of people willing and able to do the work.

I’ve always been interested in doing geometrical data. Not because there’s a big market for it at this point, but because it’s something that’s really good to have. So when a group of people in Siberia started developing this and they wanted to work with us, I said, “OK, I’ve wanted to have geometrical data for a long time. I don’t know if we have any market, but that’s a good thing. Implement it and we will hire you.”

Maybe that wasn’t a very business-like decision, but it was something that made a lot of people very happy. I was just talking with a company that has 100 gigabytes of legacy data that they didn’t know what to do with because the guy who was managing and using it recently left the company. The user had the geometrical data in an old application that nobody else knew how to use properly. Now the company can put it into MySQL and play with it and actually use it, because with SQL the commands are documented and the language is well-defined.



Databases are “Weird Beasts”

LM: Are you ever surprised by what people are doing with MySQL?

WIDENIUS: When you talk with the customer, you always get surprised. SQL is like a programming language that you can do really strange things with. Some of those strange things are incredibly clever, and some things are not that clever.

Google does a lot of really strange stuff to run their search engine. And one, not-to-be named English bank was using MySQL to do their web site. They contacted us and asked us to send someone there to check it out for stability. David went there and noticed, “Um, you don’t have a single index on a single table.” That’s not something you should do. And they had been running that live for some months, yet it had worked very well.

LM: Do you think that the relationship between MySQL and Oracle is analogous to the relationship between Linux and the proprietary Unixes?

WIDENIUS: Databases are weird beasts. They’re more like different kinds of cats. Databases are something that you either love or hate. We’ve put a lot of effort into making MySQL really easy to use and getting people to really love it. People have more feelings about their databases than about Unix-like operating systems. One reason is that you can easily port and use a tool on many different Unixes — the different versions can seem very much alike. It’s often easier to swap a Unix-like operating system than to switch a database, especially if you use a lot of features in the database.

LM: But with Linux, we had the opportunity to dump a lot of legacy stuff that wasn’t useful anymore, and it seems like MySQL has done the same kind of thing in the database world. It’s leaner and more efficient.

WIDENIUS: Before open source databases, it was a big investment to get a database and start using it. We’ve changed that. MySQL has not only dumped some legacy code, but also helped to make databases a commodity. You can now afford to put a database anywhere you want it. We believe that all applications, instead of storing data in files will basically store more and more data in the database. If they use a commercial database, that analogy doesn’t apply. It’s so much easier if you look at it and you can just ask, “Where’s the database that I can store this?” It’s easy to broadcast the existence of the database and say, “Here I am. You can store something here.”

LM: What will it take for more and more applications to embed the database that way?

WIDENIUS: It’s already happening. You can see how many tools now exist that use the database, compared to just a couple of years ago. Just to have a command line or interface to MySQL, and not an application, there are 20 different tools that people have done. And there are more and more applications that store useful things like movies using a database, and MySQL is the choice.

The database market has already started to change. It’s a different market from what it was before. And I don’t see how a commercial entity can compete there, except when a commercial applications is also delivered. But in the embedded space, we have a lot of customers, and we’re making good money there.

LM: Who is going to be particularly interested in using MySQL 5.0?

WIDENIUS: There is a big demand for stored procedures — not so much in all applications, but in applications that you want to port from a database that has stored procedures.

It means that a lot of companies are interested in going from old legacy databases to MySQL. They are already using MySQL for a lot of things in the company, but they just want to move more. Stored procedures has been one of the stumbling blocks for this.

IBM: Friend or Foe?

LM: Do you ever worry about IBM, with its strong relationship with the Linux community and the fact that it has a proprietary database that competes with you?

WIDENIUS: They are putting a lot of energy to make the platform better. That will benefit us. They are not doing DB2 open source, so it’s not a concern.

LM: But you’re not worried that they might try to move Linux in a direction that would benefit DB2 and harm MySQL?

WIDENIUS: I can’t see how they could do that, because databases are quite similar when it comes to disk I/O. That’s the bottleneck.

So, if they do something to improve things for DB/2, it’ll automatically improve things for us. I think it’s very good that IBM endorses Linux, but we are not afraid of DB2.

LM: What about other open source projects. Do you work very closely with other parts of the LAMP group?

WIDENIUS: With PHP, we have a very close relationship with Rasmus Lehrdorf. I first met him three or four years back, when he wanted the database to do some things to help PHP. We implemented those, and we have a lot of communication on both sides. We have a good relationship with the guys who maintain the MySQL API for PHP, and in the last few months, they’ve added full support for all the new 4.1 features. So we’re already supported by PHP natively.



LM: Are there other things you’d want to do with them or with other open source projects?

WIDENIUS: We are planning to add support for embeddable languages within MySQL. Now, we have the standard ANSI SQL language for stored procedures. The next step is to make it so you can write your stored procedures in Python, PHP, and so on.

There are lots of things that are needed that no one has done really well. For example, my sister should be able to put up her own web site and have a database on that.

With the PHP guys, we can probably do that, so that anybody can have their own web server where anybody can put and post things. Stuff like that. It’s not that hard, and it’s better to use open source components if you do an application like that.

The fun thing is that we already have the users doing strange things. They’re coming to us and telling us, “I did this cool thing.” I spoke with [Slashcode maintainer] Brian Aker. He’s really good at that. He’s working on a lot of things to make MySQL work better with Apache. He’s trying to embed the database inside Apache. That way, you don’t have to use the client/server architecture to embed the database, and you get a much faster Apache server.

The Challenges Ahead

LM: What do you think will be the big technical challenge, then, as MySQL grows?

WIDENIUS: The technical challenge for us is to add features while keeping speed. And on the other side, to be able to do an embeddable server that you can have in a handheld device.

We have plans to go in both directions — for example, to add a linuxconf-type tool where you can say, “I want to have these features in the server.”

LM: When do you think you would do that?

WIDENIUS: It’s not hard to do. We’ll probably look at doing at least part of that this year. I want to make it easier for users to decide which part of MySQL they want to have inside the MySQL server they compile — so they have the choice of including or excluding things like trigonometrical functions, which many people don’t use.

Stored procedures are another feature that you need to be able to turn on and off. So are different character sets. This customization will be similar to the way you define which drivers you want to compile into the Linux kernel.

LM: Have you thought much about 6.0?

WIDENIUS: I don’t know exactly what we should put in 6.0. Views are a good feature, but it’s not enough that I can say it’s radically new. So views will probably come in some form in 5.1 or 5.0. I don’t know what the big feature will be for 6.0.

If you look at the ANSI standard, there aren’t that many big features left. There’s lots and lots of small stuff. One thing that I could see for 6.0 would be certification by the ANSI committee.

LM: So do you think that the 6.0 features are being developed in a research environment right now, or do you think that there may be no need to go to 6.0?

WIDENIUS: I am sure that there will be a need. If we add some new feature that would make MySQL incompatible with MySQL 5.0 — like a new storage engine, for example, or a change in the data format we store things in — then we’d have to go to 6.0.

LM: So 5.x will be around for a while?

WIDENIUS: At least two or three years. Unless we come up with something as extraordinary as stored procedures.



Robert McMillan is Editor at Large for Linux Magazine. He can be reached at bob@linux-mag.com


Fatal error: Call to undefined function aa_author_bios() in /opt/apache/dms/b2b/linux-mag.com/site/www/htdocs/wp-content/themes/linuxmag/single.php on line 62