mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-34993: fix merge into 10.6: OPTIMIZER_ADJ_FIX_CARD_MULT should be ON by default
This commit is contained in:
@ -1709,7 +1709,7 @@ old-alter-table DEFAULT
|
|||||||
old-mode UTF8_IS_UTF8MB3
|
old-mode UTF8_IS_UTF8MB3
|
||||||
old-passwords FALSE
|
old-passwords FALSE
|
||||||
old-style-user-limits FALSE
|
old-style-user-limits FALSE
|
||||||
optimizer-adjust-secondary-key-costs fix_reuse_range_for_ref
|
optimizer-adjust-secondary-key-costs fix_reuse_range_for_ref,fix_card_multiplier
|
||||||
optimizer-join-limit-pref-ratio 0
|
optimizer-join-limit-pref-ratio 0
|
||||||
optimizer-max-sel-arg-weight 32000
|
optimizer-max-sel-arg-weight 32000
|
||||||
optimizer-max-sel-args 16000
|
optimizer-max-sel-args 16000
|
||||||
|
@ -82,7 +82,7 @@ json_detailed(json_extract(@trace, '$**.considered_access_paths'))
|
|||||||
drop table t1, name, flag2;
|
drop table t1, name, flag2;
|
||||||
select @@optimizer_adjust_secondary_key_costs;
|
select @@optimizer_adjust_secondary_key_costs;
|
||||||
@@optimizer_adjust_secondary_key_costs
|
@@optimizer_adjust_secondary_key_costs
|
||||||
fix_reuse_range_for_ref
|
fix_reuse_range_for_ref,fix_card_multiplier
|
||||||
set @@optimizer_adjust_secondary_key_costs=7;
|
set @@optimizer_adjust_secondary_key_costs=7;
|
||||||
select @@optimizer_adjust_secondary_key_costs;
|
select @@optimizer_adjust_secondary_key_costs;
|
||||||
@@optimizer_adjust_secondary_key_costs
|
@@optimizer_adjust_secondary_key_costs
|
||||||
|
@ -250,7 +250,9 @@ JS
|
|||||||
{
|
{
|
||||||
"index_name": "key1",
|
"index_name": "key1",
|
||||||
"selectivity_from_index": 0.399,
|
"selectivity_from_index": 0.399,
|
||||||
"selectivity_multiplier": 90.9091
|
"selectivity_multiplier": 90.9091,
|
||||||
|
"note": "multiplier too high, clipping",
|
||||||
|
"clipped_multiplier": 2.506265664
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
@ -266,16 +268,16 @@ JS
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"access_type": "range",
|
"access_type": "range",
|
||||||
"resulting_rows": 181.3636545,
|
"resulting_rows": 5,
|
||||||
"cost": 1.79769e308,
|
"cost": 6.83879845,
|
||||||
"chosen": true
|
"chosen": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"chosen_access_method":
|
"chosen_access_method":
|
||||||
{
|
{
|
||||||
"type": "range",
|
"type": "range",
|
||||||
"records": 181.3636545,
|
"records": 5,
|
||||||
"cost": 1.79769e308,
|
"cost": 6.83879845,
|
||||||
"uses_join_buffering": false
|
"uses_join_buffering": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -245,7 +245,9 @@ JS
|
|||||||
{
|
{
|
||||||
"index_name": "key1",
|
"index_name": "key1",
|
||||||
"selectivity_from_index": 0.391,
|
"selectivity_from_index": 0.391,
|
||||||
"selectivity_multiplier": 90.9091
|
"selectivity_multiplier": 90.9091,
|
||||||
|
"note": "multiplier too high, clipping",
|
||||||
|
"clipped_multiplier": 2.557544757
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
@ -261,16 +263,16 @@ JS
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"access_type": "range",
|
"access_type": "range",
|
||||||
"resulting_rows": 177.7272905,
|
"resulting_rows": 5,
|
||||||
"cost": 1.79769e308,
|
"cost": 6.647684891,
|
||||||
"chosen": true
|
"chosen": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"chosen_access_method":
|
"chosen_access_method":
|
||||||
{
|
{
|
||||||
"type": "range",
|
"type": "range",
|
||||||
"records": 177.7272905,
|
"records": 5,
|
||||||
"cost": 1.79769e308,
|
"cost": 6.647684891,
|
||||||
"uses_join_buffering": false
|
"uses_join_buffering": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -278,6 +278,8 @@
|
|||||||
#define OPTIMIZER_ADJ_FIX_REUSE_RANGE_FOR_REF (16)
|
#define OPTIMIZER_ADJ_FIX_REUSE_RANGE_FOR_REF (16)
|
||||||
#define OPTIMIZER_ADJ_FIX_CARD_MULT (32)
|
#define OPTIMIZER_ADJ_FIX_CARD_MULT (32)
|
||||||
|
|
||||||
|
#define OPTIMIZER_ADJ_DEFAULT (OPTIMIZER_ADJ_FIX_REUSE_RANGE_FOR_REF | \
|
||||||
|
OPTIMIZER_ADJ_FIX_CARD_MULT)
|
||||||
/*
|
/*
|
||||||
Replication uses 8 bytes to store SQL_MODE in the binary log. The day you
|
Replication uses 8 bytes to store SQL_MODE in the binary log. The day you
|
||||||
use strictly more than 64 bits by adding one more define above, you should
|
use strictly more than 64 bits by adding one more define above, you should
|
||||||
|
@ -2860,7 +2860,7 @@ static Sys_var_set Sys_optimizer_adjust_secondary_key_costs(
|
|||||||
"This variable will be deleted in MariaDB 11.0 as it is not needed with the "
|
"This variable will be deleted in MariaDB 11.0 as it is not needed with the "
|
||||||
"new 11.0 optimizer.",
|
"new 11.0 optimizer.",
|
||||||
SESSION_VAR(optimizer_adjust_secondary_key_costs), CMD_LINE(REQUIRED_ARG),
|
SESSION_VAR(optimizer_adjust_secondary_key_costs), CMD_LINE(REQUIRED_ARG),
|
||||||
adjust_secondary_key_cost, DEFAULT(OPTIMIZER_ADJ_FIX_REUSE_RANGE_FOR_REF));
|
adjust_secondary_key_cost, DEFAULT(OPTIMIZER_ADJ_DEFAULT));
|
||||||
|
|
||||||
|
|
||||||
static Sys_var_charptr_fscs Sys_pid_file(
|
static Sys_var_charptr_fscs Sys_pid_file(
|
||||||
|
Reference in New Issue
Block a user