ANALYZE: Interpreting execution stats for index-based access methods
You are viewing an old version of this article. View
the current version here.
This article describes how to interpret r_rows
and r_filtered
members in ANALYZE FORMAT=JSON output for cases when the table uses index-based access method.
Index-based access method may employ
- Index Condition Pushdown
- Rowid Filtering
- Regular attached_condition checking
Consider ANALYZE FORMAT=JSON output listing all of the above:
"table": { "table_name": "t1", "access_type": "range", "possible_keys": ..., "key": "INDEX1", ... "rowid_filter": { ... "r_selectivity_pct": n.nnn, }, ... "rows": 123, "r_rows": 125, ... "filtered": 8.476269722, "r_filtered": 100, "index_condition": "cond1", "attached_condition": "cond2" }
Access diagram
The access is performed as follows:
PIC1
Statistics before the fix for MDEV-18478
Before the fix for MDEV-18478, the counters were counted as follows:
PIC2
that is,
r_rows
is counted after Index Condition Pushdown check.r_filtered
only counts selectivity of theattached_condition
.- selectivity of the Rowid Filter is in
rowid_filter.r_selectivity_pct
.
Statistics after the fix for MDEV-18478
Comments
Comments loading...
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.