mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-34720: Poor plan choice for large JOIN with ORDER BY and small LIMIT
(Variant 2b: call greedy_search() twice, correct handling for limited search_depth) Modify the join optimizer to specifically try to produce join orders that can short-cut their execution for ORDER BY..LIMIT clause. The optimization is controlled by @@optimizer_join_limit_pref_ratio. Default value 0 means don't construct short-cutting join orders. Other value means construct short-cutting join order, and prefer it only if it promises speedup of more than #value times. In Optimizer Trace, look for these names: * join_limit_shortcut_is_applicable * join_limit_shortcut_plan_search * join_limit_shortcut_choice
This commit is contained in:
@ -760,6 +760,7 @@ typedef struct system_variables
|
||||
ulong net_retry_count;
|
||||
ulong net_wait_timeout;
|
||||
ulong net_write_timeout;
|
||||
ulonglong optimizer_join_limit_pref_ratio;
|
||||
ulong optimizer_prune_level;
|
||||
ulong optimizer_search_depth;
|
||||
ulong optimizer_selectivity_sampling_limit;
|
||||
|
Reference in New Issue
Block a user