- Local time
- Today, 02:14
- Joined
- Feb 28, 2001
- Messages
- 30,084
There are approximation methods using projections that aren't any more terrible than Great Circle computations. Trig is trig no matter what you are subjecting to sines and cosines.
My more important point was that there is no way to eliminate records without comparing them in SOME way, and the OP has 240 million comparisons to make. Even if you compare Lat/Lon in degrees without any other math, you STILL need to form the Cartesian JOIN set. I don't know of any way to filter without looking at something about each point.
My comments also made it clear that the distance function could be a simple TRUE or FALSE result based on estimated distances. But there STILL is no fast way to do the comparison math without doing some form of distance computation. Or at least I don't see it if there is.
My more important point was that there is no way to eliminate records without comparing them in SOME way, and the OP has 240 million comparisons to make. Even if you compare Lat/Lon in degrees without any other math, you STILL need to form the Cartesian JOIN set. I don't know of any way to filter without looking at something about each point.
My comments also made it clear that the distance function could be a simple TRUE or FALSE result based on estimated distances. But there STILL is no fast way to do the comparison math without doing some form of distance computation. Or at least I don't see it if there is.