[MDEV-9822] Add ability to compress existing tables Created: 2016-03-28  Updated: 2016-03-30  Resolved: 2016-03-30

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB, Storage Engine - XtraDB
Fix Version/s: N/A

Type: Task Priority: Minor
Reporter: Thomas Maerz Assignee: Sergei Golubchik
Resolution: Not a Bug Votes: 0
Labels: None


 Description   

MySQL 5.7 is able to compress existing tables by altering the table and then issuing an OPTIMIZE TABLE query:

ALTER TABLE t1 COMPRESSION="zlib";
OPTIMZE TABLE t1;

The alter table command sets the value for new writes, and the optimize table command compresses existing pages.

source: https://dev.mysql.com/doc/refman/5.7/en/innodb-page-compression.html

This would be a very nice feature to have for organizations attempting to transition their tables to use compression.



 Comments   
Comment by Sergei Golubchik [ 2016-03-29 ]

I believe, when you enable the compression with

ALTER TABLE t1 PAGE_COMPRESSED=ON

it will compress the table, all pages of it, not only new ones.

Generated at Thu Feb 08 07:37:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.