As ones data model evolves changing the database schema becomes painful, especially for big databases where the table must be taken offline. Fortunately, Tokutek introduced online schema changes starting in TokuDB v5.0.
A typical schema change involves adding or deleting a column from a table. These operations usually require the table to be rebuilt offline since the row format is different. In contrast to other storage engines however, column addition or deletion with TokuDB just inserts a broadcast update message into the fractal tree data structure, rather than rebuilding the table. This message defers changing rows from the old format to the new format and is executed after the alter table operation is long gone. The trick is to allow the storage engine to determine that the column addition or deletion does not require a …
[Read more]