Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
Description
We need statistics counters for MRR. In particular, we need
- How many MRR scans were performed
- How many key/rowid re-sort operations were made (Need separate counters for key and rowid ops).
The first attempt at counters was:
- Handler_mrr_init,
- Handler_mrr_extra_rowid_sorts,
- Handler_mrr_extra_key_sorts
(see http://kb.askmonty.org/en/multi-range-read-optimization#counters for docs)
However, the names/semantics were deemed too complicated. Now, we need to come up with simpler definitions.
== Proposal#1 ==
- Handler_mrr_init - stays the same, counts rowid-ordered scans, key-ordered scans, and key-ordered rowid-ordered scans
- Handler_mrr_rowid_ordered_passes - counts number of
{ sort rowids; do a rowid-ordered read sweep; }
passes
- Handler_mrr_key_ordered_passes - counts number of
{ sort keys; do a key-ordered read sweep; }
passes
== Proposal#2 ==
Same as above but break Handler_mrr_init into three:
- Handler_mrr_key_ordered
- Handler_mrr_rowid_ordered
- Handler_mrr_key_rowid_ordered
== Decision ==
On the last optimizer call, we've decided to go with these counters:
Handler_mrr_init
Handler_mrr_key_refills
Handler_mrr_rowid_refills
and the first fill is not counted as a "refill".