Re:Efficient Distance Querying in MySQL
by IdontRememberIt on Wednesday November 10, 2021 @07:21PM
(#29182841)
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.
https://dev.mysql.com/doc/refman/8.0/en/spatial-types.html
http://postgis.refractions.net/
https://sqlite.org/rtree.html