|
Currently, the default for optimizer_use_condition_selectivity is 1
https://mariadb.com/kb/en/mariadb/server-system-variables/#optimizer_use_condition_selectivity
Meanings of values from here:
1 Use selectivity of predicates as in MariaDB 5.5.
|
2 Use selectivity of all range predicates supported by indexes.
|
3 Use selectivity of all range predicates estimated without histogram.
|
4 Use selectivity of all range predicates estimated with histogram.
|
5 Additionally use selectivity of certain non-range predicates calculated on record sample.
|
We could change the default to be 4. (This is not a big change as it may seem, because histograms are not collected automatically).
|