Coordinates comparison in database
问题 I am developing a Spring app that has to search for persons using GPS coordinates. For each in the DB person I have his latitude and his longitude. The client pass a point and a max distance to the server which has to return all the clients around this point in this distance. The problem is that the database contains about 300k persons, so getting all the persons and iterating through this list to chck if they are near the point is really slow. Any idea to speed up this search ? 回答1: The best