From 5.5, the INNODB engine can also be compressed like the MYISAM engine. Of course, the compressed table is okay. You should not INSERT or UPDATE it. DELETE doesn't matter. It's just MARK, and then batch DELETE it. This is the same as the BRIGHTHOUSE engine.
Of course, not all tables are suitable for compression and then reading. Application scenarios, data distribution, and hardware resources all restrict compression. At this time, the best way is to conduct stress testing to see if it is suitable for your own business. The following are some new features of the compressed table.
1. the compressed table is only valid for a single tablespace. Therefore, set the following parameters:Innodb_file_per_tableinnodb_file_format = Barracuda
2. Create Table OPTIONS.ROW_DATEFORMAT = COMPRESSED KEY_BLOCK_SIZE = (, 16.) depending on the distribution of the table data to be COMPRESSED. Simply put, you can use the same data to insert tables of different structures. After you finish viewing the size of the disk table, you will be OK.
3. Pay attention to another feature.If INNODB's compressed table is set, your INNODB_BUFFER_POOL_SIZE should be at least twice the previous size. Because two pages with different sizes but consistent data must be retained in the buffer pool. In this way, the memory overhead is increased.
This article is from "god, let's see it !" Blog, please be sure to keep this source http://yueliangdao0608.blog.51cto.com/397025/935513