I\'m trying to figure out how to optimize a very slow query in MySQL (I didn\'t design this):
SELECT COUNT(*) FROM change_event me WHERE change_event_id >
I've run into behavior like this before with IP geolocation databases. Past some number of records, MySQL's ability to get any advantage from indexes for range-based queries apparently evaporates. With the geolocation DBs, we handled it by segmenting the data into chunks that were reasonable enough to allow the indexes to be used.