I've recently altered a huge MyISAM
table (80 million entries) by adding a new value in an enum field. After I did this I've checked the health of the table on 2 slave servers which are used to replicate the master server.
I've noticed that MYI
file is much smaller on one of the slave servers. I've repaired the table with myisamchk
and REPAIR
but the size of the index has not changed.
Please see below the results returned by running myisamchk -dvv
on these 3 servers for "Keyfile length":
Master Server
Auto increment key: 1 Last value: 80098340
Data records: 79375556 Deleted blocks: 0
Datafile parts: 79375556 Deleted data: 0
Datafile pointer (bytes): 6 Keyfile pointer (bytes): 6
Datafile length: 9635014668 **Keyfile length: 18945252352**
Max datafile length: 281474976710654 Max keyfile length: 288230376151710719
Recordlength: 1110
Slave Server 1
Auto increment key: 1 Last value: 80097611
Data records: 79374828 Deleted blocks: 0
Datafile parts: 79394418 Deleted data: 0
Datafile pointer (bytes): 6 Keyfile pointer (bytes): 6
Datafile length: 9635788652 **Keyfile length: 18024821760**
Max datafile length: 281474976710654 Max keyfile length: 288230376151710719
Recordlength: 1110
Slave Server 2 - Here the size of Keyfile is much smaller
Auto increment key: 1 Last value: 80098312
Data records: 79375002 Deleted blocks: 0
Datafile parts: 79375002 Deleted data: 0
Datafile pointer (bytes): 6 Keyfile pointer (bytes): 6
Datafile length: 9634942908 **Keyfile length: 11092404224**
Max datafile length: 281474976710654 Max keyfile length: 288230376151710719
What could possibly cause such a significant difference?