TokuDB is highly recommended for slaves in production environment. Here are 9 advantages of using TokuDB in production.
1) Data warehouse / big data solution:
TokuDB may take the same amount of time to complete the query if the data is small and fits in memory.
But with huge data, InnoDB is not able to perform while tokuDB gives you quick results.
2) Integrates with MySQL:
TOkuDB is an engine just like MyISAM and InnoDB. It is listed as default engine in the output of "show engines" command.
3) Highly compressed data:
TokuDB compresses data upto 15 to 20% compared to MyISAM or InnODB.
Tokudb disk consumption:
-rwxrwx--x 1 root root 222M Oct 25 19:27 _akola_ticket_main_41e0_1_18_B_0.tokudb
-rwxrwx--x 1 root root 68M Oct 25 19:27 _akola_ticket_key_tripindex_41e0_1_18_B_2.tokudb
-rwxrwx--x 1 root root 52M Oct 25 19:27 _akola_ticket_key_route_no_41e0_1_18_B_5.tokudb
-rwxrwx--x 1 root root 50M Oct 25 19:27 _akola_ticket_key_adjtripno_41e0_1_18_B_3.tokudb
-rwxrwx--x 1 root root 36M Oct 25 19:42 _akola_ticket_key_wbindex_41e0_1_18_B_1.tokudb
-rwxrwx--x 1 root root 34M Oct 25 19:27 _akola_ticket_key_NewIndex1_41e0_1_18_B_4.tokudb
MyISAM disk consumption for the same table:
-rw-rw---- 1 root root 1.5G Jul 10 00:36 ticket.MYD
-rw-rw---- 1 root root 335M Jul 10 00:40 ticket.MYI
4) Easily transfer data:
I can simply alter table to toku using alter table statement.
alter table tbl_name engine=TokuDB;
Or I can take the backup without specifing the engine. Since TokuDB is the default engine, it will be converted to tokudb while restoring data.
mysqldump db_name --routines --compatible=no_table_options > db_name_to_toku.sql
5) Crash Revoery:
TOkuDB has one of the excellent crash recovery feature just like InnoDB (that MyISAM is missing!)
6) Replication — Eliminate Slave Lag:
MySQL’s single threaded design often leads to slave lag. With TokuDB, slave lag is eliminated.
This insures replication can be used for read scaling, backups, and disaster recovery, without resorting to sharding, expensive hardware.
7) Hot Schema Changes in Seconds:
TokuDB introduced Hot Column Addition (HCAD). You can add or delete columns from an existing table with minimal downtime.
8) No need to configure parameters:
You may need to increase only open files limit if you get an error something like...
[ERROR] Error in accept: Too many open files
Other than this you do not need to configure anything! Now compare this with InnoDB.
By default, TokuDB uses about half the memory of the machine as buffer pool (or disk cache). That leaves the other half of memory for the OS to allocate.
9) InnoDB disk consumption:
InnoDB stores data in ibdata files and the disk consumption is not reduced even if you drop tables.
TokuDB tables works like MyISAM and frees the disk space immediately once you drop / truncate tables.