SQL query optimized to run haversine on entries only within the defined area.