mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Make the most important optimizer constants user variables
Variables added: - optimizer_index_block_copy_cost - optimizer_key_copy_cost - optimizer_key_next_find_cost - optimizer_key_compare_cost - optimizer_row_copy_cost - optimizer_where_compare_cost Some rename of defines was done to make the internal defines similar to the visible ones: TIME_FOR_COMPARE -> WHERE_COST; WHERE_COST was also "inverted" to be a number between 0 and 1 that is multiply with accepted records (similar to other optimizer variables). TIME_FOR_COMPARE_IDX -> KEY_COMPARE_COST. This is also inverted, similar to TIME_FOR_COMPARE. TIME_FOR_COMPARE_ROWID -> ROWID_COMPARE_COST. This is also inverted, similar to TIME_FOR_COMPARE. All default costs are identical to what they where before this patch. Other things: - Compare factor in get_merge_buffers_cost() was inverted. - Changed namespace to static in filesort_utils.cc
This commit is contained in:
@ -158,7 +158,7 @@ explain select * from t1 where a=1 or b=1 {
|
||||
}
|
||||
}
|
||||
],
|
||||
"index_roworder_union_cost": 2.595171589,
|
||||
"index_roworder_union_cost": 2.601171589,
|
||||
"members": 2,
|
||||
"chosen": true
|
||||
}
|
||||
@ -187,7 +187,7 @@ explain select * from t1 where a=1 or b=1 {
|
||||
]
|
||||
},
|
||||
"rows_for_plan": 2,
|
||||
"cost_for_plan": 2.595171589,
|
||||
"cost_for_plan": 2.601171589,
|
||||
"chosen": true
|
||||
}
|
||||
}
|
||||
@ -220,14 +220,14 @@ explain select * from t1 where a=1 or b=1 {
|
||||
"rows": 2,
|
||||
"rows_after_scan": 2,
|
||||
"rows_after_filter": 2,
|
||||
"cost": 2.595171589,
|
||||
"cost": 2.601171589,
|
||||
"chosen": true
|
||||
}
|
||||
],
|
||||
"chosen_access_method": {
|
||||
"type": "index_merge",
|
||||
"records": 2,
|
||||
"cost": 2.595171589,
|
||||
"cost": 2.601171589,
|
||||
"uses_join_buffering": false
|
||||
}
|
||||
}
|
||||
@ -238,14 +238,14 @@ explain select * from t1 where a=1 or b=1 {
|
||||
"plan_prefix": [],
|
||||
"table": "t1",
|
||||
"rows_for_plan": 2,
|
||||
"cost_for_plan": 2.595171589
|
||||
"cost_for_plan": 2.601171589
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"best_join_order": ["t1"],
|
||||
"rows": 2,
|
||||
"cost": 2.595171589
|
||||
"cost": 2.601171589
|
||||
},
|
||||
{
|
||||
"substitute_best_equal": {
|
||||
@ -630,7 +630,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
|
||||
}
|
||||
}
|
||||
],
|
||||
"index_roworder_union_cost": 332.5637481,
|
||||
"index_roworder_union_cost": 333.0257481,
|
||||
"members": 2,
|
||||
"chosen": true
|
||||
}
|
||||
@ -697,7 +697,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.chosen_range_access_summary'))
|
||||
]
|
||||
},
|
||||
"rows_for_plan": 154,
|
||||
"cost_for_plan": 332.5637481,
|
||||
"cost_for_plan": 333.0257481,
|
||||
"chosen": true
|
||||
}
|
||||
]
|
||||
|
Reference in New Issue
Block a user