I have a table with the following attributes:
MyTable:
- double longitude
- double latitude
- varchar place_id
- varcar geoJSON_string
Given some point having a longitude x and latitude y I need to select the k closest points.
I know I tack a LIMIT k on the end of the query, but is there a way I can guarantee at least k points from a database of ~250,000 records?
Also, how would I even query the decimal values? I need to select something similar to the following:
SELECT * FROM MyTable WHERE latitude=140.3**** and longitude=132.2**** LIMIT k;
or, if you need the best result :