ANALYZE: Interpreting rows and filtered members
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:
Statistics before the fix for MDEV-18478
Before the fix for MDEV-18478, the counters were counted as follows:
that is,
r_rowsis counted after Index Condition Pushdown check.r_filteredonly counts selectivity of theattached_condition.- selectivity of the Rowid Filter is in
rowid_filter.r_selectivity_pct.
Statistics after the fix for MDEV-18478
After the fix for MDEV-18478, there are more counter:
r_index_rowscounts the number of enumerated index tuples, before any checks were mader_rowsis the same as before - number of full rows.
Selectivities of all checks are counted:
r_icp_filteredis the percentage of records left after pushed index condition check.rowid_filter.r_selectivity_pctshows selectivity of Rowid Filter, as before.r_condition_filteredis the selectivity ofattached_conditioncheck.- Finally,
r_filteredis the combined selectivity of all checks.
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.