mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-18478 ANALYZE for statement should show selectivity of ICP, part#2
Part#2, variant 2: Make the printed r_ values in JSON output consistent. After this patch, ANALYZE output has: - r_index_rows (NEW) - Observed number of rows before ICP or Rowid Filtering checks. This is a per-scan average. like r_rows and "rows" are. - r_rows (AS BEFORE) - Observed number of rows after ICP and Rowid Filtering. - r_icp_filtered (NEW) - Observed selectivity of ICP condition. - (AS BEFORE) observed selectivity of Rowid Filter is in $.rowid_filter.r_selectivity_pct - r_total_filtered - Observed combined selectivity: fraction of rows left after applying ICP condition, Rowid Filter, and attached_condition. This is now comparable with "filtered" and is printed right after it. - r_filtered (AS BEFORE) - Observed selectivity of "attached_condition". Tabular ANALYZE output is not changed. Note that JSON's r_filtered and r_rows have the same meanings as before and have the same meaning as in tabular output.
This commit is contained in:
@ -1311,6 +1311,7 @@ ANALYZE
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_total_filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"using_index_for_group_by": true
|
||||
}
|
||||
@ -1721,6 +1722,7 @@ ANALYZE
|
||||
"r_rows": null,
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 0,
|
||||
"r_total_filtered": null,
|
||||
"r_filtered": null,
|
||||
"impossible_on_condition": true
|
||||
}
|
||||
@ -1738,6 +1740,7 @@ ANALYZE
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_total_filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
}
|
||||
@ -1815,6 +1818,7 @@ ANALYZE
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_total_filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
},
|
||||
@ -1836,8 +1840,9 @@ ANALYZE
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"r_total_filtered": 100,
|
||||
"attached_condition": "trigcond(t2.pk is null) and trigcond(trigcond(t1.a is not null))",
|
||||
"r_filtered": 100,
|
||||
"using_index": true,
|
||||
"not_exists": true
|
||||
}
|
||||
@ -1919,8 +1924,9 @@ ANALYZE
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "t1.a is not null"
|
||||
"r_total_filtered": 100,
|
||||
"attached_condition": "t1.a is not null",
|
||||
"r_filtered": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -1941,6 +1947,7 @@ ANALYZE
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_total_filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"using_index": true,
|
||||
"distinct": true
|
||||
@ -2039,8 +2046,9 @@ ANALYZE
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "t3.a is not null"
|
||||
"r_total_filtered": 100,
|
||||
"attached_condition": "t3.a is not null",
|
||||
"r_filtered": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -2062,8 +2070,9 @@ ANALYZE
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"index_condition_bka": "t4.b + 1 <= t3.b + 1"
|
||||
"r_total_filtered": 100,
|
||||
"index_condition_bka": "t4.b + 1 <= t3.b + 1",
|
||||
"r_filtered": 100
|
||||
},
|
||||
"buffer_type": "flat",
|
||||
"buffer_size": "400",
|
||||
|
Reference in New Issue
Block a user