MariaDB [(none)]> use test;
|
Reading table information for completion of table and column names
|
You can turn off this feature to get a quicker startup with -A
|
|
Database changed
|
MariaDB [test]> CREATE TABLE `tab` (
|
-> `id` int(11) NOT NULL,
|
-> `str` varchar(50) DEFAULT NULL,
|
-> PRIMARY KEY (`id`)
|
-> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
Query OK, 0 rows affected (0,08 sec)
|
|
MariaDB [test]> INSERT INTO tab VALUES (1, 'str1');
|
Query OK, 1 row affected (0,01 sec)
|
|
MariaDB [test]> SET GLOBAL innodb_compression_algorithm=zlib;
|
Query OK, 0 rows affected (0,00 sec)
|
|
MariaDB [test]> ALTER TABLE tab PAGE_COMPRESSED=1;
|
Query OK, 1 row affected (0,08 sec)
|
Records: 1 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> SHOW GLOBAL STATUS LIKE 'Innodb_num_pages_page_compressed';
|
+----------------------------------+-------+
|
| Variable_name | Value |
|
+----------------------------------+-------+
|
| Innodb_num_pages_page_compressed | 3 |
|
+----------------------------------+-------+
|
1 row in set (0,02 sec)
|
|
MariaDB [test]> OPTIMIZE TABLE tab;
|
+----------+----------+----------+-------------------------------------------------------------------+
|
| Table | Op | Msg_type | Msg_text |
|
+----------+----------+----------+-------------------------------------------------------------------+
|
| test.tab | optimize | note | Table does not support optimize, doing recreate + analyze instead |
|
| test.tab | optimize | status | OK |
|
+----------+----------+----------+-------------------------------------------------------------------+
|
2 rows in set (0,10 sec)
|
|
MariaDB [test]> SHOW GLOBAL STATUS LIKE 'Innodb_num_pages_page_compressed';
|
+----------------------------------+-------+
|
| Variable_name | Value |
|
+----------------------------------+-------+
|
| Innodb_num_pages_page_compressed | 6 |
|
+----------------------------------+-------+
|
1 row in set (0,03 sec)
|
|
MariaDB [test]> ALTER TABLE tab ENGINE=InnoDB;
|
Query OK, 0 rows affected (0,08 sec)
|
Records: 0 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> SHOW GLOBAL STATUS LIKE 'Innodb_num_pages_page_compressed';
|
+----------------------------------+-------+
|
| Variable_name | Value |
|
+----------------------------------+-------+
|
| Innodb_num_pages_page_compressed | 6 |
|
+----------------------------------+-------+
|
1 row in set (0,04 sec)
|
|
MariaDB [test]> SHOW GLOBAL STATUS LIKE 'Innodb_num_pages_page_compressed';
|
+----------------------------------+-------+
|
| Variable_name | Value |
|
+----------------------------------+-------+
|
| Innodb_num_pages_page_compressed | 9 |
|
+----------------------------------+-------+
|
1 row in set (0,02 sec)
|