MySQL Blog Archive
For the latest blogs go to
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.