BerkeleyDB (BDB) Tables


The other option you have for a transaction-safe storage engine for MySQL is BerkeleyDB (usually abbreviated to BDB). BDB is provided by Sleepycat software (www. sleepycat .com). It is not as widely used for transaction work in MySQL as InnoDB. The BDB engine has been around for a long time, but the MySQL integration is still relatively new, and the manual tells us the interface with MySQL is of "gamma" quality. That is, it's more reliable than a beta, but with the odd bug. Mind you, MySQL's idea of beta tends to be more reliable than many companies' gold releases.

BDB uses page-level locking and, as such, will give you slightly worse performance than InnoDB. It is also slow if you open a large number of tables at the same time.

All BDB tables must have a primary key (not that this is much of a problem because we would recommend this anyway). In fact, one will be created silently for you if you do not create one for yourself.

BDB tables are stored as b-trees. Compare this to most other table types that store their indexes as b-trees. This slows down table scanning (such as when you are retrieving all rows from the table or performing unindexed queries). BDB tables also take up more space on disk.

One important limitation of BDB tables is that you cannot move the stored data around on disk. This is because the data stored for a table includes the path to the data. You must also be careful when backing up BDB tables to remember to back up the log files because you will be unable to restart without them.



MySQL Tutorial
MySQL Tutorial
ISBN: 0672325845
EAN: 2147483647
Year: 2003
Pages: 261

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net