I have a table in a database with over a million geospatial points that we'll call 'flags'. I also have a feed of live 'vehicles' which report their latitude and longitude positions.
Every time a vehicle's position comes through I need to run code that does this:
Select all flags that are within a 100 metre radius of this vehicle's position.
Is this possible with SQL? If so how could I go about doing it?