Skip to content
This repository has been archived by the owner on Jun 12, 2020. It is now read-only.

Compression

prohaska edited this page Sep 26, 2014 · 8 revisions

Feature Summary


Compression User Interface on Tokutek's MySQL and MariaDB Builds

mysql> show variables like 'tokudb_row_format';
tokudb_zlib
mysql> create table t_default (x int, y int);

mysql> show create table t_default;
CREATE TABLE `t_default` (
  `x` int(11) DEFAULT NULL,
  `y` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1
mysql> create table t_uncompressed (x int, y int) row_format=tokudb_uncompressed;

mysql> show create table t_uncompressed;
CREATE TABLE `t_uncompressed` (
  `x` int(11) DEFAULT NULL,
  `y` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ROW_FORMAT=TOKUDB_UNCOMPRESSED
mysql> create table t_quicklz (x int, y int) row_format=tokudb_quicklz;
Query OK, 0 rows affected (0.15 sec)

mysql> show create table t_quicklz;
CREATE TABLE `t_quicklz` (
  `x` int(11) DEFAULT NULL,
  `y` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ROW_FORMAT=TOKUDB_QUICKLZ
mysql> create table t_zlib (x int, y int) row_format=tokudb_zlib;
Query OK, 0 rows affected (0.15 sec)

mysql> show create table t_zlib;
CREATE TABLE `t_zlib` (
  `x` int(11) DEFAULT NULL,
  `y` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1
mysql> create table t_lzma (x int, y int) row_format=tokudb_lzma;
Query OK, 0 rows affected (0.14 sec)

mysql> show create table t_lzma;
CREATE TABLE `t_lzma` (
  `x` int(11) DEFAULT NULL,
  `y` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ROW_FORMAT=TOKUDB_LZMA

Compression User Interface on Percona Server

The user interface for TokuDB compression is the same as Tokutek's as it also uses the 'row_format' table option.


Compression User Interface on MariaDB 10

MariaDB [test]> create table t_default (x int, y int);

MariaDB [test]> show create table t_default;
CREATE TABLE `t_default` (
  `x` int(11) DEFAULT NULL,
  `y` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
MariaDB [test]> show variables like 'tokudb_row_format';
tokudb_zlib
MariaDB [test]> create table t_uncompressed (x int, y int) compression=tokudb_uncompressed;

MariaDB [test]> show create table t_uncompressed;
CREATE TABLE `t_uncompressed` (
  `x` int(11) DEFAULT NULL,
  `y` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`=tokudb_uncompressed
MariaDB [test]> create table t_quicklz (x int, y int) compression=tokudb_quicklz;

MariaDB [test]> show create table t_quicklz;
CREATE TABLE `t_quicklz` (
  `x` int(11) DEFAULT NULL,
  `y` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`=tokudb_quicklz
MariaDB [test]> create table t_zlib (x int, y int) compression=tokudb_zlib;

MariaDB [test]> show create table t_zlib;
CREATE TABLE `t_zlib` (
  `x` int(11) DEFAULT NULL,
  `y` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`=tokudb_zlib
MariaDB [test]> create table t_lzma (x int, y int) compression=tokudb_lzma;

MariaDB [test]> show create table t_lzma;
CREATE TABLE `t_lzma` (
  `x` int(11) DEFAULT NULL,
  `y` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`=tokudb_lzma

Blogs

Clone this wiki locally