maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #11554
MDEV-16188: Rowid filtering: EXPLAIN FORMAT=JSON support
Hello Igor,
I have pushed into 10.4-mdev16188 tree a patch that adds EXPLAIN FORMAT=JSON
support. There is no ANALYZE support, yet.
main.rowid_filter has an example of EXPLAIN FORMAT=JSON at the bottom. The
filter is described like so:
+ "rowid_filter": {
+ "range": {
+ "key": "i_l_shipdate",
+ "used_key_parts": ["l_shipDATE"]
+ },
+ "rows": 8,
+ "selectivity_pct": 0.1332
+ },
Here "rows" is how many rows we will get from the quick select that is used to
build the filter.
selectivity_pct is the selectivity of the filter.
You will also notice this change from (1%) to (0%):
-1 SIMPLE lineitem range|filter PRIMARY,i_l_shipdate,i_l_receiptdate,i_l_orderkey,i_l_orderkey_quantity i_l_receiptdate|i_l_shipdate 4|4 NULL 6 (1%) Using index condition; Using where; Using filter
+1 SIMPLE lineitem range|filter PRIMARY,i_l_shipdate,i_l_receiptdate,i_l_orderkey,i_l_orderkey_quantity i_l_receiptdate|i_l_shipdate 4|4 NULL 6 (0%) Using index condition; Using where; Using filter
This is because the original code had a piece of logic in
JOIN_TAB::save_filter_explain_data: print "1%" if it was "0%".
I'm wondering, is there any reason we cannot print the number with greater
precision in this case?
BR
Sergei
--
Sergei Petrunia, Software Developer
MariaDB Corporation | Skype: sergefp | Blog: http://s.petrunia.net/blog