DMA population is 220, UserID population is 3 million. I will test different clustering.
The problem seems to be the following:
the ranges are disjoints: 1-10, 20-25, 40-40, 55-58, 800-801, 9999-10100, .....
basically only one range has to be checked the first FromIP <= BigIP (order by FromIP asc) range
if no hit in this range, BigIP should be abandoned and check should proceed to the next one
However, the query does not tell the optimizer really that the ranges are disjoint, so the optimizer goes on and checks the following, for example, 800K ranges where FromIP < BigIP. Actually it appears that the optimizer is doing the right thing.
I am experimenteing with a self-join on the ID column of IPMapToDMA which would force only a single range check.