Four query execution stages keep a counter called matchTested: AND_SORTED, FETCH, IXSCAN, and OR.
It would seem reasonable to assume that matchTested means the number of results that were tested against a filter (the number that passed the filter plus the number that were rejected by the filter). In fact, all of the stages count matchTested as just the number of results that pass the filter.
Not only is this confusing naming, but it is a less useful statistic: the number passing the filter can already be inferred via the advanced counter. We should consider changing the meaning of the counter to align with its naming.
Edit: For IXSCAN, FETCH, and OR, the value of matchTested can be inferred by the value of the advanced counter. As such, this information is redundant: we should remove it for these three stages. For AND_SORTED, we should change its semantics per above.
- links to