In order to compress a file with level of 9 (maximum level of compression), you need to
set an ENV variable. In order to not clobber the file system environments you can use pipe in your command:
#tar #gzip #compression_level
set an ENV variable. In order to not clobber the file system environments you can use pipe in your command:
tar cvf - /path/to/directory | gzip -9 - > file.tar.gz
#tar #gzip #compression_level
Table compression in
https://dev.mysql.com/doc/refman/5.5/en/innodb-compression-usage.html
#database #mysql #compression #innodb
MySQL
:https://dev.mysql.com/doc/refman/5.5/en/innodb-compression-usage.html
#database #mysql #compression #innodb
If you have space problems on a server that hosts
In order to compress data on a table:
The output in my case squeezed data 4X:
After compression:
#mysql #innodb #compression #alter #row_format #compressed
MySQL
database, it's good idea to use compression. Make sure you are using InnoDB
storage engine.In order to compress data on a table:
alter table YOUR_DB_NAME.YOUR_TABLE_NAME ROW_FORMAT=COMPRESSED;
The output in my case squeezed data 4X:
ls -lh users.ibd | awk '{print $5}'
16G
After compression:
ls -lh users.ibd | awk '{print $5}'
3.9G
NOTE:
you have to use innodb_file_per_table
in your configuration. We have previously talked about this procedure step by step.#mysql #innodb #compression #alter #row_format #compressed