Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
Description
Troubleshooting join optimization involves examining what happened whenwe were considering certain join prefix, e.g. t1,t2,t3,...
Optimizer trace prints the join prefix as plan_prefix array:
"rest_of_plan": [
|
{
|
"plan_prefix": ["t1", "t2", "t3"],
|
"get_costs_for_tables": [
|
Problems with this representation are:
- it's hard to type all the quotes and spaces when grepping.
- if line length exceeds 80 chars the array is printed as
"plan_prefix": [
|
"t1",
|
"t2",
|
"t3"],
|
which makes grepp-ing nearly impossible.
A counter-argument is, why doesn't one use JSONPath language to search for an "array of t1, t2, t3?"
Reply to that: MariaDB's JSONPath dialect doesn't support predicates at all. Even if we did support full JSONPath, searching for array of
{t1 t2 t3}would look like this
$.plan_prefix? (@[1]=="t1" && @[2]="t2" && @[3]="t3")
|
which is still way behind grepping for "plan_prefix": "t1,t2,t3".