With mysql 5.7, range searches on indexes (BETWEEN() or equivalent) are notoriously slow with large datasets.
We discovered that spacial index (flatten to 1 dimension) can be used to solve a common issue: ip range queries.
The query costs dropped and all the query metrics improved.