Book Image

MariaDB Cookbook

By : Daniel Bartholomew
Book Image

MariaDB Cookbook

By: Daniel Bartholomew

Overview of this book

Table of Contents (20 chapters)
MariaDB Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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:

  1. Launch the mysql command-line client and connect to the isfdb database.

  2. Alter the titles table to use default compression, as shown in the following command:

    ALTER TABLE titles ENGINE=TokuDB
      ROW_FORMAT=default ;
    
  3. 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;
    
  4. 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;
    
  5. Alter the notes table to use the lzma compressor, as shown in the following command:

    ALTER TABLE notes ENGINE=TokuDB
      ROW_FORMAT=tokudb_lzma...