Modifying the compression of a TokuDB table
TokuDB has several compression options to help us strike the perfect balance between disk space and performance.
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
titles
table to use default compression, as shown in the following command:ALTER TABLE titles ENGINE=TokuDB ROW_FORMAT=default ;
Alter the
pub_content
table to use high compression, as shown in the following command:ALTER TABLE pub_content ENGINE=TokuDB ROW_FORMAT=tokudb_small;
Alter the
canonical_author
table to have fast compression, as shown in the following command:ALTER TABLE canonical_author ENGINE=TokuDB ROW_FORMAT=tokudb_fast;
Alter the
notes
table to use thelzma
compressor, as shown in the following command:ALTER TABLE notes ENGINE=TokuDB ROW_FORMAT=tokudb_lzma...