MDEV-25830 optimizer_use_condition_selectivity=4 sometimes produces worse plan...
MDEV-25830 optimizer_use_condition_selectivity=4 sometimes produces worse plan than optimizer_use_condition_selectivity=1 The issue was that calc_cond_selectivity_for_table prefered ranges with many parts and when deciding on which selectivity to use. Fixed by going through ranges according to the number of rows in the range. This ensures that selectivity from ranges with few rows will be prefered over ranges with many rows for indexes that uses the same columns.
Showing
Please register or sign in to comment