mariadb/mysql-test/main/opt_trace_ucs2.result
Sergei Krivonos 73df7a3009 MDEV-27036: resolve duplicated key issues of JSON tracing outputs:
MDEV-27036: repeated "table" key resolve for print_explain_json

MDEV-27036: duplicated keys in best_access_path

MDEV-27036: Explain_aggr_filesort::print_json_members: resolve duplicated "filesort" member in Json object

MDEV-27036: Explain_basic_join::
            print_explain_json_interns fixed start_dups_weedout case for main.explain_json test
2021-11-26 15:11:06 +02:00

58 lines
1.5 KiB
Text

create or replace table t1 (col1 char(10) character set ucs2, filler char(100), key(col1)) ;
insert into t1 values ('a', 'a');
insert into t1 values ('a', 'a');
set optimizer_trace=1;
explain format=json select * from t1 force index(col1) where col1 >='a';
EXPLAIN
{
"query_block": {
"select_id": 1,
"nested_loop": [
{
"table": {
"table_name": "t1",
"access_type": "range",
"possible_keys": ["col1"],
"key": "col1",
"key_length": "21",
"used_key_parts": ["col1"],
"rows": 2,
"filtered": 100,
"index_condition": "t1.col1 >= 'a'"
}
}
]
}
}
select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
[
{
"range_scan_alternatives":
[
{
"index": "col1",
"ranges":
[
"(a) <= (col1)"
],
"rowid_ordered": false,
"using_mrr": false,
"index_only": false,
"rows": 2,
"cost": 2.547733708,
"chosen": true
}
],
"analyzing_roworder_intersect":
{
"cause": "too few roworder scans"
},
"analyzing_index_merge_union":
[
]
}
]
drop table t1;