mirror of
https://github.com/MariaDB/server.git
synced 2025-01-27 17:33:44 +01:00
270 lines
9.5 KiB
Text
270 lines
9.5 KiB
Text
|
SET GLOBAL innodb_file_format = `Barracuda`;
|
||
|
SET GLOBAL innodb_file_per_table = ON;
|
||
|
SET GLOBAL innodb_compression_algorithm = 2;
|
||
|
CREATE TABLE INNODB_COMPRESSED(c1 INT, b char(20)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
|
||
|
SHOW WARNINGS;
|
||
|
Level Code Message
|
||
|
CREATE TABLE INNODB_NORMAL (c1 INT, b char(20)) ENGINE=INNODB;
|
||
|
SHOW WARNINGS;
|
||
|
Level Code Message
|
||
|
CREATE TABLE INNODB_PAGE_COMPRESSED1 (c1 INT, b char(20)) ENGINE=INNODB PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=1;
|
||
|
SHOW WARNINGS;
|
||
|
Level Code Message
|
||
|
SHOW CREATE TABLE INNODB_PAGE_COMPRESSED1;
|
||
|
Table Create Table
|
||
|
INNODB_PAGE_COMPRESSED1 CREATE TABLE `INNODB_PAGE_COMPRESSED1` (
|
||
|
`c1` int(11) DEFAULT NULL,
|
||
|
`b` char(20) DEFAULT NULL
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `PAGE_COMPRESSED`=1 `PAGE_COMPRESSION_LEVEL`=1
|
||
|
CREATE TABLE INNODB_PAGE_COMPRESSED2 (c1 INT, b char(20)) ENGINE=INNODB PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=2;
|
||
|
SHOW WARNINGS;
|
||
|
Level Code Message
|
||
|
SHOW CREATE TABLE INNODB_PAGE_COMPRESSED2;
|
||
|
Table Create Table
|
||
|
INNODB_PAGE_COMPRESSED2 CREATE TABLE `INNODB_PAGE_COMPRESSED2` (
|
||
|
`c1` int(11) DEFAULT NULL,
|
||
|
`b` char(20) DEFAULT NULL
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `PAGE_COMPRESSED`=1 `PAGE_COMPRESSION_LEVEL`=2
|
||
|
CREATE TABLE INNODB_PAGE_COMPRESSED3 (c1 INT, b char(20)) ENGINE=INNODB PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=3;
|
||
|
SHOW WARNINGS;
|
||
|
Level Code Message
|
||
|
SHOW CREATE TABLE INNODB_PAGE_COMPRESSED3;
|
||
|
Table Create Table
|
||
|
INNODB_PAGE_COMPRESSED3 CREATE TABLE `INNODB_PAGE_COMPRESSED3` (
|
||
|
`c1` int(11) DEFAULT NULL,
|
||
|
`b` char(20) DEFAULT NULL
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `PAGE_COMPRESSED`=1 `PAGE_COMPRESSION_LEVEL`=3
|
||
|
CREATE TABLE INNODB_PAGE_COMPRESSED4 (c1 INT, b char(20)) ENGINE=INNODB PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=4;
|
||
|
SHOW WARNINGS;
|
||
|
Level Code Message
|
||
|
SHOW CREATE TABLE INNODB_PAGE_COMPRESSED4;
|
||
|
Table Create Table
|
||
|
INNODB_PAGE_COMPRESSED4 CREATE TABLE `INNODB_PAGE_COMPRESSED4` (
|
||
|
`c1` int(11) DEFAULT NULL,
|
||
|
`b` char(20) DEFAULT NULL
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `PAGE_COMPRESSED`=1 `PAGE_COMPRESSION_LEVEL`=4
|
||
|
CREATE TABLE INNODB_PAGE_COMPRESSED5 (c1 INT, b char(20)) ENGINE=INNODB PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=5;
|
||
|
SHOW WARNINGS;
|
||
|
Level Code Message
|
||
|
SHOW CREATE TABLE INNODB_PAGE_COMPRESSED5;
|
||
|
Table Create Table
|
||
|
INNODB_PAGE_COMPRESSED5 CREATE TABLE `INNODB_PAGE_COMPRESSED5` (
|
||
|
`c1` int(11) DEFAULT NULL,
|
||
|
`b` char(20) DEFAULT NULL
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `PAGE_COMPRESSED`=1 `PAGE_COMPRESSION_LEVEL`=5
|
||
|
CREATE TABLE INNODB_PAGE_COMPRESSED6 (c1 INT, b char(20)) ENGINE=INNODB PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=6;
|
||
|
SHOW WARNINGS;
|
||
|
Level Code Message
|
||
|
SHOW CREATE TABLE INNODB_PAGE_COMPRESSED6;
|
||
|
Table Create Table
|
||
|
INNODB_PAGE_COMPRESSED6 CREATE TABLE `INNODB_PAGE_COMPRESSED6` (
|
||
|
`c1` int(11) DEFAULT NULL,
|
||
|
`b` char(20) DEFAULT NULL
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `PAGE_COMPRESSED`=1 `PAGE_COMPRESSION_LEVEL`=6
|
||
|
CREATE TABLE INNODB_PAGE_COMPRESSED7 (c1 INT, b char(20)) ENGINE=INNODB PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=7;
|
||
|
SHOW WARNINGS;
|
||
|
Level Code Message
|
||
|
SHOW CREATE TABLE INNODB_PAGE_COMPRESSED7;
|
||
|
Table Create Table
|
||
|
INNODB_PAGE_COMPRESSED7 CREATE TABLE `INNODB_PAGE_COMPRESSED7` (
|
||
|
`c1` int(11) DEFAULT NULL,
|
||
|
`b` char(20) DEFAULT NULL
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `PAGE_COMPRESSED`=1 `PAGE_COMPRESSION_LEVEL`=7
|
||
|
CREATE TABLE INNODB_PAGE_COMPRESSED8 (c1 INT, b char(20)) ENGINE=INNODB PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=8;
|
||
|
SHOW WARNINGS;
|
||
|
Level Code Message
|
||
|
SHOW CREATE TABLE INNODB_PAGE_COMPRESSED8;
|
||
|
Table Create Table
|
||
|
INNODB_PAGE_COMPRESSED8 CREATE TABLE `INNODB_PAGE_COMPRESSED8` (
|
||
|
`c1` int(11) DEFAULT NULL,
|
||
|
`b` char(20) DEFAULT NULL
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `PAGE_COMPRESSED`=1 `PAGE_COMPRESSION_LEVEL`=8
|
||
|
CREATE TABLE INNODB_PAGE_COMPRESSED9 (c1 INT, b char(20)) ENGINE=INNODB PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=9;
|
||
|
SHOW WARNINGS;
|
||
|
Level Code Message
|
||
|
SHOW CREATE TABLE INNODB_PAGE_COMPRESSED9;
|
||
|
Table Create Table
|
||
|
INNODB_PAGE_COMPRESSED9 CREATE TABLE `INNODB_PAGE_COMPRESSED9` (
|
||
|
`c1` int(11) DEFAULT NULL,
|
||
|
`b` char(20) DEFAULT NULL
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `PAGE_COMPRESSED`=1 `PAGE_COMPRESSION_LEVEL`=9
|
||
|
CREATE PROCEDURE INNODB_INSERT_PROC (REPEAT_COUNT INT)
|
||
|
BEGIN
|
||
|
DECLARE CURRENT_NUM INT;
|
||
|
SET CURRENT_NUM = 0;
|
||
|
WHILE CURRENT_NUM < REPEAT_COUNT DO
|
||
|
INSERT INTO INNODB_NORMAL VALUES(CURRENT_NUM,'Testing..');
|
||
|
SET CURRENT_NUM = CURRENT_NUM + 1;
|
||
|
END WHILE;
|
||
|
END//
|
||
|
COMMIT;
|
||
|
SET AUTOCOMMIT=0;
|
||
|
CALL INNODB_INSERT_PROC(5000);
|
||
|
COMMIT;
|
||
|
SET AUTOCOMMIT=1;
|
||
|
SELECT COUNT(*) FROM INNODB_NORMAL;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
INSERT INTO INNODB_COMPRESSED SELECT * FROM INNODB_NORMAL;
|
||
|
INSERT INTO INNODB_PAGE_COMPRESSED1 SELECT * FROM INNODB_NORMAL;
|
||
|
INSERT INTO INNODB_PAGE_COMPRESSED2 SELECT * FROM INNODB_NORMAL;
|
||
|
INSERT INTO INNODB_PAGE_COMPRESSED3 SELECT * FROM INNODB_NORMAL;
|
||
|
INSERT INTO INNODB_PAGE_COMPRESSED4 SELECT * FROM INNODB_NORMAL;
|
||
|
INSERT INTO INNODB_PAGE_COMPRESSED5 SELECT * FROM INNODB_NORMAL;
|
||
|
INSERT INTO INNODB_PAGE_COMPRESSED6 SELECT * FROM INNODB_NORMAL;
|
||
|
INSERT INTO INNODB_PAGE_COMPRESSED7 SELECT * FROM INNODB_NORMAL;
|
||
|
INSERT INTO INNODB_PAGE_COMPRESSED8 SELECT * FROM INNODB_NORMAL;
|
||
|
INSERT INTO INNODB_PAGE_COMPRESSED9 SELECT * FROM INNODB_NORMAL;
|
||
|
COMMIT;
|
||
|
SELECT COUNT(*) FROM INNODB_COMPRESSED;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED1;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED1 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED2 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED3 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED4 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED5 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED6 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED7 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED8 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED9 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
ALTER TABLE INNODB_NORMAL PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=8;
|
||
|
SHOW WARNINGS;
|
||
|
Level Code Message
|
||
|
SHOW CREATE TABLE INNODB_NORMAL;
|
||
|
Table Create Table
|
||
|
INNODB_NORMAL CREATE TABLE `INNODB_NORMAL` (
|
||
|
`c1` int(11) DEFAULT NULL,
|
||
|
`b` char(20) DEFAULT NULL
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `PAGE_COMPRESSED`=1 `PAGE_COMPRESSION_LEVEL`=8
|
||
|
ALTER TABLE INNODB_COMPRESSED ROW_FORMAT=DEFAULT PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=8 KEY_BLOCK_SIZE=0;
|
||
|
SHOW WARNINGS;
|
||
|
Level Code Message
|
||
|
SHOW CREATE TABLE INNODB_COMPRESSED;
|
||
|
Table Create Table
|
||
|
INNODB_COMPRESSED CREATE TABLE `INNODB_COMPRESSED` (
|
||
|
`c1` int(11) DEFAULT NULL,
|
||
|
`b` char(20) DEFAULT NULL
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `PAGE_COMPRESSED`=1 `PAGE_COMPRESSION_LEVEL`=8
|
||
|
SET GLOBAL innodb_compression_algorithm = 1;
|
||
|
UPDATE INNODB_PAGE_COMPRESSED1 SET c1 = c1 + 1;
|
||
|
UPDATE INNODB_PAGE_COMPRESSED2 SET c1 = c1 + 1;
|
||
|
UPDATE INNODB_PAGE_COMPRESSED3 SET c1 = c1 + 1;
|
||
|
UPDATE INNODB_PAGE_COMPRESSED4 SET c1 = c1 + 1;
|
||
|
UPDATE INNODB_PAGE_COMPRESSED5 SET c1 = c1 + 1;
|
||
|
UPDATE INNODB_PAGE_COMPRESSED6 SET c1 = c1 + 1;
|
||
|
UPDATE INNODB_PAGE_COMPRESSED7 SET c1 = c1 + 1;
|
||
|
UPDATE INNODB_PAGE_COMPRESSED8 SET c1 = c1 + 1;
|
||
|
UPDATE INNODB_PAGE_COMPRESSED9 SET c1 = c1 + 1;
|
||
|
COMMIT;
|
||
|
SELECT COUNT(*) FROM INNODB_COMPRESSED;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED1;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED1 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED2 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED3 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED4 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED5 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED6 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED7 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED8 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED9 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SET GLOBAL innodb_compression_algorithm = 0;
|
||
|
UPDATE INNODB_PAGE_COMPRESSED1 SET c1 = c1 + 1;
|
||
|
UPDATE INNODB_PAGE_COMPRESSED2 SET c1 = c1 + 1;
|
||
|
UPDATE INNODB_PAGE_COMPRESSED3 SET c1 = c1 + 1;
|
||
|
UPDATE INNODB_PAGE_COMPRESSED4 SET c1 = c1 + 1;
|
||
|
UPDATE INNODB_PAGE_COMPRESSED5 SET c1 = c1 + 1;
|
||
|
UPDATE INNODB_PAGE_COMPRESSED6 SET c1 = c1 + 1;
|
||
|
UPDATE INNODB_PAGE_COMPRESSED7 SET c1 = c1 + 1;
|
||
|
UPDATE INNODB_PAGE_COMPRESSED8 SET c1 = c1 + 1;
|
||
|
UPDATE INNODB_PAGE_COMPRESSED9 SET c1 = c1 + 1;
|
||
|
COMMIT;
|
||
|
SELECT COUNT(*) FROM INNODB_COMPRESSED;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED1;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED1 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED2 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED3 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED4 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED5 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED6 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED7 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED8 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
SELECT COUNT(*) FROM INNODB_PAGE_COMPRESSED9 WHERE C1 < 500000;
|
||
|
COUNT(*)
|
||
|
5000
|
||
|
DROP PROCEDURE INNODB_INSERT_PROC;
|
||
|
DROP TABLE INNODB_NORMAL;
|
||
|
DROP TABLE INNODB_COMPRESSED;
|
||
|
DROP TABLE INNODB_PAGE_COMPRESSED1;
|
||
|
DROP TABLE INNODB_PAGE_COMPRESSED2;
|
||
|
DROP TABLE INNODB_PAGE_COMPRESSED3;
|
||
|
DROP TABLE INNODB_PAGE_COMPRESSED4;
|
||
|
DROP TABLE INNODB_PAGE_COMPRESSED5;
|
||
|
DROP TABLE INNODB_PAGE_COMPRESSED6;
|
||
|
DROP TABLE INNODB_PAGE_COMPRESSED7;
|
||
|
DROP TABLE INNODB_PAGE_COMPRESSED8;
|
||
|
DROP TABLE INNODB_PAGE_COMPRESSED9;
|