I have a table, stores
, with thousands of stores that deliver. If i have the lat
, lng
, and delivery_radius
for each store (I can add a point
column), what is the most efficient way to query the table to see which stores can deliver to where I stand currently?
I feel that checking if the distance between myself and each row is less than the delivery_radius
would be a very long process. Would it be best to add a column to store a polygon calculated from each row's info and see if my current point is in that polygon (point-in-polygon)? Any other suggestions?