Griff
Griff

Reputation: 1757

Mysql row format compressed what are the drawbacks?

The mysql manual is all go for compression using ROW_FORMAT=COMPRESSED but I noticed I can also set a key block size value.

What various effects does this have disregarding the actual compression of the file size.

Example

KEY_BLOCK_SIZE = 2

And

KEY_BLOCK_SIZE = 4

Above both compresses at different sizes but are there any drawbacks using on or the other?

Upvotes: 2

Views: 1700

Answers (1)

Piotr
Piotr

Reputation: 146

There is one obvious problem: less block size = less performance, especially in OLTP applications.

The interesting thing is that for tables with InnoDB, lower block size does not mean smaller compressed table.

You should read how it works: http://dev.mysql.com/doc/refman/5.5/en/innodb-compression-internals.html or check every possible value from 1 to 16 :)

Upvotes: 1

Related Questions