There are these 2 tables. (A) contains locations defined by lat/long data. (B) is a city dictionary with the centroid of every city defined by lat/long data. The task is to find the nearest city (found in B) for every location (found in A).
Is there a way by which A can be updated at once, via, say, a computed JOIN (such as min absolute difference between A.lat and B.lat + A.long and B.long approach)?
For now I process table A row by row, but this is time consuming.
How would you go about it?