Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is mysql automatically compressing the database?

Tags:

mysql

My table entry was pretty long , around 10000 characters , so i'm wondering if i need to compress that myself , e.g use gzip library , before inserting to mysql ?

Current i'm using MyISAM database format.

Thanks !

like image 529
daisy Avatar asked Jan 23 '26 12:01

daisy


2 Answers

InnoDB support data compression:

http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-compression-usage.html

like image 178
Moshe L Avatar answered Jan 26 '26 02:01

Moshe L


you can use the attributes ROW_FORMAT=COMPRESSED, KEY_BLOCK_SIZE, or both in the CREATE TABLE and ALTER TABLE statements to enable table compression. Depending on the combination of option values, InnoDB attempts to compress each page

For more details go through below link:

Enabling Compression for a Table