mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +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:
@@ -692,6 +692,10 @@ typedef struct system_variables
|
||||
ulonglong slave_skip_counter;
|
||||
ulonglong max_relay_log_size;
|
||||
|
||||
double optimizer_index_block_copy_cost, optimizer_key_next_find_cost;
|
||||
double optimizer_row_copy_cost, optimizer_key_copy_cost;
|
||||
double optimizer_where_cost, optimizer_key_cmp_cost;
|
||||
|
||||
ha_rows select_limit;
|
||||
ha_rows max_join_size;
|
||||
ha_rows expensive_subquery_limit;
|
||||
@@ -776,7 +780,7 @@ typedef struct system_variables
|
||||
|
||||
uint group_concat_max_len;
|
||||
uint eq_range_index_dive_limit;
|
||||
uint optimizer_cache_hit_ratio;
|
||||
uint optimizer_cache_hit_ratio; // Stored in handler::optimizer_cache_cost
|
||||
int max_user_connections;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user