Сolumns compression
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I propose to introduce columns compression with index syntax:
Table example:
CREATE TABLE `online` (
`sid` varchar(32) NOT NULL,
`uid` int(4) NOT NULL default '0',
`xstas` tinyint(2) NOT NULL default '0',
`name` varchar(20) NOT NULL,
`time` int(12) NOT NULL,
`ip` varchar(15) default NULL,
`fields` BLOB NOT NULL,
`text` TEXT NOT NULL,
PRIMARY KEY USING BTREE (`sid`),
KEY `uid` USING BTREE (`uid`,`xstas`),
KEY `time` USING BTREE (`time`),
COMRESSOR `data` USING LZO (`fields`,`text`) LEVEL 9
) ENGINE=MEMORY;
This universal realization of compression will be usefull for tables without compression support (such as myisam, memory, ...) and may be more effecient for innodb table, because this compression lets compress group of columns as one element...
Create syntax example:
CREATE COMPRESSOR compressor_name
[compressor
ON tbl_name (col_name,...)
[compressor
col_name:
col_name
compressor_type:
USING {ZLIB | LZO | LZ4 | ZSTD | LZMA ...}
compressor_option:
LEVEL compression_level
| COMMENT 'string'
Example:
CREATE TABLE `lookup` (`id` INT, `name` TEXT, `text` TEXT) ENGINE = MEMORY;
CREATE INDEX `id_index` ON `lookup` (`id`) USING BTREE;
CREATE COMPRESSOR `data_compressor` ON `lookup` (`name`,`text`) USING ZLIB LEVEL 9;
Please take a look at https:/ /blueprints. launchpad. net/percona- server/ +spec/change- compression, we are likely to implement that. But it does not include support for column groups.