You asked for it: new default for eq_range_index_dive_limit

In MySQL 5.6 we made it possible to estimate the number of fetched rows for queries with many equality predicates (e.g., many values in the IN clause). The new way of estimating fetched rows kicks in if the number of equality predicates exceeds the value of eq_range_index_dive_limit, which has a default of 10.

The good thing about the new way of estimating number of rows is that it is faster than the old way (index dives). On the other hand it is also less accurate.

As it happens, we got push back from the community that the default value should have been higher. Among others we heard this:

“eq_range_index_dive_limit is helpful to reduce index dive costs on making query execution plans, but we think 10 is way too small.”

Well… you got it! The new default in 5.7 is 200.

2 thoughts on “You asked for it: new default for eq_range_index_dive_limit

Leave a Reply

Your email address will not be published. Required fields are marked *


3 − = zero

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">