I found this question and am wondering, is it for PostgreSQL? Where’s the documentation for
<->? Trying to find the fastest way to get the distance between a lat and long earth coordinates in Redshift.
Note that this is an extension to the core distance operator shipped with PostgreSQL. This and its sibling operators are implemented with conditional access a to a suitable index (supporting (K)NN traversal) if put into the
ORDER BY clause - and only this implementation detail is the primary performance advantage over plain distance functions!
For spatial distances in the PostGIS extension environment, the operator either returns 2D cartesian distances (
GEOMETRY) or spherical (great-circle) distances (