@H_502_0@原文:http://www.ibm.com/developerworks/library/os-beyondMysqL/
<h2 id="N10045">Introduction
@H_502_0@MysqL is one of the most popular free and open source programs in history. It's the database backbone for thousands of websites and could arguably be given credit (along with Linux®) for the explosive growth of the Internet over the past 10 years.
@H_502_0@So,if MysqL is so important,why is increasing amount of high profile off-shoots of the core MysqL product? Because MysqL is free and open source,developers have always been able to take the code,modify it as they see fit,and distribute it on their own. For a long time,there weren't any branches of MysqL that a developer would trust in their own production environment. However,that's changing rapidly. Several branches are getting a lot of attention.
@H_502_0@This article will discuss three popular branches of MysqL that are gaining attention: Drizzle,MariaDB,and Percona Server,including the XtraDB engine. This article will talk briefly about the reasons for each branch and their goals,and whether to use them in your own production environment. By the time you finish this article,you should be able to answer the question "Are these MysqL branch products a good solution for my environment?"
<h2 id="N10054">Why branch?
@H_502_0@Why does MysqL need to be branched? That's a very legitimate question. Thousands of websites depend on it and it seems to be a good solution for many people. However,as is often the case,what's good for many people isn't good for all people. Some developers are motivated to make things better for their own needs. What could be better than turning a great solution into the perfect solution?
@H_502_0@Let's get into more specific details about what these branches sought to change. Some branches felt that MysqL was becoming too bloated and was offering many features that would never interest users,at the expense of simplicity of performance. If people were perfectly happy with the more streamlined MysqL 4,why should they deal with the additional complexity that was added with MysqL 5? For this branch,a preferred branch of MysqL would be simpler and faster — offer less features,but make them extremely quick,keeping in mind a target audience,in this case high availability websites.
@H_502_0@To other branches,MysqL wasn't offering enough new features,or were adding them too slowly. They may have felt that MysqL wasn't keeping up with its target markets of high availability websites running on multi-core processors with lots of RAM. As people familiar with MysqL know,it offers two different storage enginges — MyISAM and InnoDB. This branch felt that neither of these storage engines offered them exactly what they were looking for,so they created a new storage engine perfectly suited for their goals.
@H_502_0@Further,some branches have a top goal to be a "drop in" replacement to MysqL,where you could simply drop in their branch and not have to change one line of code. The branch uses the same code and interfaces as MysqL,making a transition as easy as possible. Yet,another branch boasts that it's not compatible with MysqL,requiring code changes. Each branch is also at a different maturity level,with some claiming they are production ready,and some claiming they are far from that goal at this point.
@H_502_0@Finally,there's uncertainty about how MysqL will fare under Oracle. Oracle bought Sun,who bought MysqL,and right now Oracle controls the MysqL product itself,and leads the development community in producing new finished products. Because Oracle already has a commercial database,there is concern that they may not put sufficient resources into MysqL to keep it cutting-edge. Therefore,many branches are also a result of the underlying fear that MysqL,the leading free and open source database,may see less features,slower release cycles,and more expensive support.
<h2 id="N10071">XtraDB
@H_502_0@XtraDB is not a stand-alone product itself,but it is still considered a branch of MysqL. XtraDB is actually a storage engine for MysqL-based databases. This would be considered an additional storage engine to the standard MyISAM and InnoDB that are already a part of MysqL. MysqL 4 and 5 installs with each table using the default MyISAM storage engine. InnoDB is also a relatively newer option for a storage engine,and database administrators and developers can choose the types of storage engine,on a per table basis,when they set up the database. The major difference between the two storage engines is that MyISAM does not offer transactional support,while InnoDB does. Other differences are many small performance differences,with InnoDB offering many small performance improvements over MyISAM,and more reliability and safety when dealing with potential data loss. As it appears that InnoDB is the better-suited storage engine for future improvements,MysqL has switched the default storage engine to InnoDB instead of MyISAM starting with the 5.5 release.
@H_5020@Building on these advantages,the InnoDB storage engine itself has been branched into a newer storage engine called XtraDB. Just how new is this storage engine? It was first released less than 3 years ago by Percona. So,it's relatively new. It was designed specifically to deal with modern high availability websites running on modern servers. It was designed to run on servers with a dozen or more cores and lots of RAM (32 GB and more). These are the kinds of servers any company can order from a server management company,and therefore,a database should be designed to take full advantage of these servers.
@H5020@The XtraDB branch had another goal — be a simple drop-in replacement for the InnoDB storage engine,so that users could simply switch their storage engine without having to change any of their underlying application code. XtraDB had to be backwards-compatible with InnoDB in addition to providing all the new features and improvements they wanted to add. They accomplished this goal.
@H502_0@How much faster is XtraDB? One performance test I found said that it offered 2.7x more transactions per minute than the built-in MysqL 5.1 InnoDB engine (See <a href="http://www.ibm.com/developerworks/library/os-beyondMysqL/#resources">Resources). That's certainly not something to dismiss,especially considering it's drop-and-go.
<h2 id="N10088">Percona
@H_502_0@XtraDB offers some great improvements over built-in MysqL storage engines,but it's not a stand-alone product,and nor is it something that you can simply drop into your existing MysqL installation. So,if you want to use this new storage engine,you have to use a product that offers it.
@H_502_0@Percona Server is just such a product,put out by the leading MysqL consulting company,Percona. It's a stand-alone database product that offers users the ability to swap out their MysqL installation and swap in the Percona Server product,and by doing so,take advantage of the XtraDB storage engine. It makes the claim that it is fully compatible with MysqL,so in theory no code would have to change in your software. That's definitely a huge advantage,and great for quality control when you're looking for a quick performance improvement. So,a good reason for looking at Percona Server is to take advantage of the XtraDB engine with as few changes to your core code as possible.
@H_5020@Additionally,they are the original authors of the XtraDB storage engine. Percona open-sourced this code so you can find it in other products,but the original creators of the engine are the same ones who wrote this product. You can use this information as you wish.
@H502_0@Here are the purported claims of Percona Server,coming from their own website:
<ul class="ibm-bullet-list">