Migrating to TokuDB
TokuDB doesn't do us any good if we don't use it. Migrating existing tables to TokuDB, whether they are MyISAM, Aria, or InnoDB/XtraDB, is fairly painless.
Getting ready
Import the ISFDB database as described in the Importing the data exported by mysqldump recipe in Chapter 2, Diving Deep into MariaDB.
How to do it...
Follow the ensuing steps:
Launch the
mysql
command-line client and connect to theisfdb
database.Alter the
pub%
tables to be TokuDB tables:ALTER TABLE pub_authors ENGINE=TokuDB; ALTER TABLE pub_content ENGINE=TokuDB; ALTER TABLE pub_series ENGINE=TokuDB; ALTER TABLE publishers ENGINE=TokuDB;
Run
SHOW CREATE TABLE
on each of the tables to verify that they now haveENGINE=TokuDB
after the data definition section. Using thepublishers
table as an example, we get the following output:Convert additional tables in the
isfdb
database to TokuDB format if required.
How it works...
The ALTER TABLE
statement works in three stages. It first creates a new table using the new...