mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-19160 JSON_DETAILED output unnecessarily verbose
This commit is contained in:
@ -307,17 +307,13 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
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": "key1",
|
||||
"ranges":
|
||||
[
|
||||
"(100) <= (key1) <= (100)"
|
||||
],
|
||||
["(100) <= (key1) <= (100)"],
|
||||
"rowid_ordered": true,
|
||||
"using_mrr": false,
|
||||
"index_only": false,
|
||||
@ -325,13 +321,10 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
|
||||
"cost": 2844.1,
|
||||
"chosen": true
|
||||
},
|
||||
|
||||
{
|
||||
"index": "key2",
|
||||
"ranges":
|
||||
[
|
||||
"(100) <= (key2) <= (100)"
|
||||
],
|
||||
["(100) <= (key2) <= (100)"],
|
||||
"rowid_ordered": true,
|
||||
"using_mrr": false,
|
||||
"index_only": false,
|
||||
@ -340,13 +333,10 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
|
||||
"chosen": false,
|
||||
"cause": "cost"
|
||||
},
|
||||
|
||||
{
|
||||
"index": "key3",
|
||||
"ranges":
|
||||
[
|
||||
"(100) <= (key3) <= (100)"
|
||||
],
|
||||
["(100) <= (key3) <= (100)"],
|
||||
"rowid_ordered": true,
|
||||
"using_mrr": false,
|
||||
"index_only": false,
|
||||
@ -360,7 +350,6 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
|
||||
{
|
||||
"intersecting_indexes":
|
||||
[
|
||||
|
||||
{
|
||||
"index": "key1",
|
||||
"index_scan_cost": 58.252,
|
||||
@ -372,7 +361,6 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
|
||||
"intersect_covering_with_this_index": false,
|
||||
"chosen": true
|
||||
},
|
||||
|
||||
{
|
||||
"index": "key2",
|
||||
"index_scan_cost": 58.252,
|
||||
@ -384,7 +372,6 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
|
||||
"intersect_covering_with_this_index": false,
|
||||
"chosen": true
|
||||
},
|
||||
|
||||
{
|
||||
"index": "key3",
|
||||
"index_scan_cost": 58.252,
|
||||
@ -408,14 +395,12 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
|
||||
"chosen": true
|
||||
},
|
||||
"analyzing_index_merge_union":
|
||||
[
|
||||
]
|
||||
[]
|
||||
}
|
||||
]
|
||||
select JSON_DETAILED(JSON_EXTRACT(trace, '$**.chosen_range_access_summary')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
|
||||
JSON_DETAILED(JSON_EXTRACT(trace, '$**.chosen_range_access_summary'))
|
||||
[
|
||||
|
||||
{
|
||||
"range_access_plan":
|
||||
{
|
||||
@ -426,35 +411,26 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.chosen_range_access_summary'))
|
||||
"clustered_pk_scan": false,
|
||||
"intersect_of":
|
||||
[
|
||||
|
||||
{
|
||||
"type": "range_scan",
|
||||
"index": "key1",
|
||||
"rows": 2243,
|
||||
"ranges":
|
||||
[
|
||||
"(100) <= (key1) <= (100)"
|
||||
]
|
||||
["(100) <= (key1) <= (100)"]
|
||||
},
|
||||
|
||||
{
|
||||
"type": "range_scan",
|
||||
"index": "key2",
|
||||
"rows": 2243,
|
||||
"ranges":
|
||||
[
|
||||
"(100) <= (key2) <= (100)"
|
||||
]
|
||||
["(100) <= (key2) <= (100)"]
|
||||
},
|
||||
|
||||
{
|
||||
"type": "range_scan",
|
||||
"index": "key3",
|
||||
"rows": 2243,
|
||||
"ranges":
|
||||
[
|
||||
"(100) <= (key3) <= (100)"
|
||||
]
|
||||
["(100) <= (key3) <= (100)"]
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -470,32 +446,25 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
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":
|
||||
[
|
||||
],
|
||||
[],
|
||||
"analyzing_roworder_intersect":
|
||||
{
|
||||
"cause": "too few roworder scans"
|
||||
},
|
||||
"analyzing_index_merge_union":
|
||||
[
|
||||
|
||||
{
|
||||
"indexes_to_merge":
|
||||
[
|
||||
|
||||
{
|
||||
"range_scan_alternatives":
|
||||
[
|
||||
|
||||
{
|
||||
"index": "key1",
|
||||
"ranges":
|
||||
[
|
||||
"(100) <= (key1) <= (100)"
|
||||
],
|
||||
["(100) <= (key1) <= (100)"],
|
||||
"rowid_ordered": true,
|
||||
"using_mrr": false,
|
||||
"index_only": true,
|
||||
@ -503,13 +472,10 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
|
||||
"cost": 152.53,
|
||||
"chosen": true
|
||||
},
|
||||
|
||||
{
|
||||
"index": "key2",
|
||||
"ranges":
|
||||
[
|
||||
"(100) <= (key2) <= (100)"
|
||||
],
|
||||
["(100) <= (key2) <= (100)"],
|
||||
"rowid_ordered": true,
|
||||
"using_mrr": false,
|
||||
"index_only": true,
|
||||
@ -522,17 +488,13 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
|
||||
"index_to_merge": "key1",
|
||||
"cumulated_cost": 152.53
|
||||
},
|
||||
|
||||
{
|
||||
"range_scan_alternatives":
|
||||
[
|
||||
|
||||
{
|
||||
"index": "key3",
|
||||
"ranges":
|
||||
[
|
||||
"(100) <= (key3) <= (100)"
|
||||
],
|
||||
["(100) <= (key3) <= (100)"],
|
||||
"rowid_ordered": true,
|
||||
"using_mrr": false,
|
||||
"index_only": true,
|
||||
@ -540,13 +502,10 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
|
||||
"cost": 152.53,
|
||||
"chosen": true
|
||||
},
|
||||
|
||||
{
|
||||
"index": "key4",
|
||||
"ranges":
|
||||
[
|
||||
"(100) <= (key4) <= (100)"
|
||||
],
|
||||
["(100) <= (key4) <= (100)"],
|
||||
"rowid_ordered": true,
|
||||
"using_mrr": false,
|
||||
"index_only": true,
|
||||
@ -565,20 +524,16 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
|
||||
"cause": "always cheaper than non roworder retrieval",
|
||||
"analyzing_roworder_scans":
|
||||
[
|
||||
|
||||
{
|
||||
"type": "range_scan",
|
||||
"index": "key1",
|
||||
"rows": 2243,
|
||||
"ranges":
|
||||
[
|
||||
"(100) <= (key1) <= (100)"
|
||||
],
|
||||
["(100) <= (key1) <= (100)"],
|
||||
"analyzing_roworder_intersect":
|
||||
{
|
||||
"intersecting_indexes":
|
||||
[
|
||||
|
||||
{
|
||||
"index": "key1",
|
||||
"index_scan_cost": 58.252,
|
||||
@ -590,7 +545,6 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
|
||||
"intersect_covering_with_this_index": false,
|
||||
"chosen": true
|
||||
},
|
||||
|
||||
{
|
||||
"index": "key2",
|
||||
"index_scan_cost": 58.252,
|
||||
@ -614,20 +568,16 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
|
||||
"chosen": true
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"type": "range_scan",
|
||||
"index": "key3",
|
||||
"rows": 2243,
|
||||
"ranges":
|
||||
[
|
||||
"(100) <= (key3) <= (100)"
|
||||
],
|
||||
["(100) <= (key3) <= (100)"],
|
||||
"analyzing_roworder_intersect":
|
||||
{
|
||||
"intersecting_indexes":
|
||||
[
|
||||
|
||||
{
|
||||
"index": "key3",
|
||||
"index_scan_cost": 58.252,
|
||||
@ -639,7 +589,6 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
|
||||
"intersect_covering_with_this_index": false,
|
||||
"chosen": true
|
||||
},
|
||||
|
||||
{
|
||||
"index": "key4",
|
||||
"index_scan_cost": 58.252,
|
||||
@ -674,14 +623,12 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
|
||||
select JSON_DETAILED(JSON_EXTRACT(trace, '$**.chosen_range_access_summary')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
|
||||
JSON_DETAILED(JSON_EXTRACT(trace, '$**.chosen_range_access_summary'))
|
||||
[
|
||||
|
||||
{
|
||||
"range_access_plan":
|
||||
{
|
||||
"type": "index_roworder_union",
|
||||
"union_of":
|
||||
[
|
||||
|
||||
{
|
||||
"type": "index_roworder_intersect",
|
||||
"rows": 77,
|
||||
@ -690,29 +637,22 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.chosen_range_access_summary'))
|
||||
"clustered_pk_scan": false,
|
||||
"intersect_of":
|
||||
[
|
||||
|
||||
{
|
||||
"type": "range_scan",
|
||||
"index": "key1",
|
||||
"rows": 2243,
|
||||
"ranges":
|
||||
[
|
||||
"(100) <= (key1) <= (100)"
|
||||
]
|
||||
["(100) <= (key1) <= (100)"]
|
||||
},
|
||||
|
||||
{
|
||||
"type": "range_scan",
|
||||
"index": "key2",
|
||||
"rows": 2243,
|
||||
"ranges":
|
||||
[
|
||||
"(100) <= (key2) <= (100)"
|
||||
]
|
||||
["(100) <= (key2) <= (100)"]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"type": "index_roworder_intersect",
|
||||
"rows": 77,
|
||||
@ -721,25 +661,19 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.chosen_range_access_summary'))
|
||||
"clustered_pk_scan": false,
|
||||
"intersect_of":
|
||||
[
|
||||
|
||||
{
|
||||
"type": "range_scan",
|
||||
"index": "key3",
|
||||
"rows": 2243,
|
||||
"ranges":
|
||||
[
|
||||
"(100) <= (key3) <= (100)"
|
||||
]
|
||||
["(100) <= (key3) <= (100)"]
|
||||
},
|
||||
|
||||
{
|
||||
"type": "range_scan",
|
||||
"index": "key4",
|
||||
"rows": 2243,
|
||||
"ranges":
|
||||
[
|
||||
"(100) <= (key4) <= (100)"
|
||||
]
|
||||
["(100) <= (key4) <= (100)"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user