MDEV-20444: More information regarding access of a table to be printed inside the optimizer_trace

Added:
      1) estimated_join_cardinality
      2) best_chosen_access_method for a table
      3) best_join_order
This commit is contained in:
Varun Gupta 2019-09-04 19:51:27 +05:30
commit 7b988e5ceb
7 changed files with 1279 additions and 181 deletions

View file

@ -208,13 +208,24 @@ explain select * from t1 where pk1 != 0 and key1 = 1 {
"chosen": false,
"cause": "cost"
}
]
],
"chosen_access_method": {
"type": "ref",
"records": 1,
"cost": 2,
"uses_join_buffering": false,
"filter_used": false
}
},
"rows_for_plan": 1,
"cost_for_plan": 2.2
"cost_for_plan": 2.2,
"estimated_join_cardinality": 1
}
]
},
{
"best_join_order": ["t1"]
},
{
"attaching_conditions_to_tables": {
"original_condition": "t1.key1 = 1 and t1.pk1 <> 0",