| Statistics counters for Multi Range Read |
| Friday, 27 January 2012 10:06 |
|
MariaDB 5.3 has now three statistics counters for Multi Range Read optimization: MariaDB [test]> show status like 'Handler_mrr%'; +-------------------------------+-------+ | Variable_name | Value | +-------------------------------+-------+ | Handler_mrr_extra_key_sorts | 0 | | Handler_mrr_extra_rowid_sorts | 0 | | Handler_mrr_init | 0 | +-------------------------------+-------+ 3 rows in set (0. 08 sec) I’ve just added the first two. The reason for having them is as follows: the point of MRR is to provide speedup over regular execution by doing reads in disk order. In order to make reads in disk order, MRR needs buffer space where it accumulates and sorts read requests. If there are too many read requests to fit into the buffer, MRR will make multiple accumulate-sort-read passes. Doing multiple passes allows MRR to operate when having limited buffer space, but the speedup will be not as great as with one big disk-ordered read sweep. The purpose of There are two counters,
MRR code will try to distribute buffer space between them in an optimal way. The decision is a guess based on the available statistics, and can be wrong. Having both counters will allow us to check how the guess will work in practice. p.s. if you could not make any sense of anything above, try reading Multi Range Read page in our knowlegebase. We have just put there a hopefully-readable explanation of what MRR is. PlanetMySQL Voting: Vote UP / Vote DOWN read original article |
