For MyISAM one of the most important variables is the Key
Buffer. The Key Buffer is sometimes called the Key Cache.
It's used as a buffer for the indices of MyISAM tables. There is
some overhead in the buffer depending on the configured key block
The official way to calculate the key buffer usage as documented in the MySQL Reference manual:
1 - ((Key_blocks_unused * key_cache_block_size) / key_buffer_size)
This will return the factor, so you have to multiply it with 100 to get the percentage. The Key_blocks_unused is used instead of the more obvious Key_blocks_used. This is due to the fact that …[Read more...]