I have point
in my db (Postgres postgis):
CREATE TABLE geometries (name varchar, geom geometry);
With example data:
INSERT INTO geometries VALUES ('Point', 'POINT(0 0)');
INSERT INTO geometries VALUES ('Point', 'POINT(10 0)');
I would like to select one point closest to input - for example (1, 1)
It must be geographics distance using haversine formula
(https://www.movable-type.co.uk/scripts/latlong.html).
What is the best way (fastest by performance) how can I do it?