MySQL MyIsam Compressing tables

Posted on

Question :

Im packing big MyISAM tables with myisampack and came up with the following issue. (MariaDB 10.1.14 64bit windows)
Indexes are rebuilt after packing the tablewhile running myisamchk -rq, so, it doesnt make sense to create/have them beforehand. After compressing a table without indexes and trying to recreate all indexes at once, i’ve noted that the table is uncompressed back.

Is there a way which i could modify the frm in a way i could rebuild the indexes without uncompressing the table?

Does MySQL use the uncompressed index in order to build the compressed index?

Thanks!

Alex

Answer :

I will try to :

Create empty table with indexes
DISABLE KEYS
Load Data
myisampack table
myisamchk -rq

Hopefully myisamchk will build the indexes without ENABLE KEYS

Leave a Reply

Your email address will not be published. Required fields are marked *