I want to be able to identify the closest roads to two points that are generated through geocoding (a start and end address). The points will likely be near a linestring. Two approaches that I have been experimenting with are:

While both of these are quite fast, I'm unsure if this is the best way of performing this calculation. Both methods assume that the geo-coded point will be <50m away from a road. I also want to figure out the best way of finding two roads and cannot think of an alternative, other than to run to separate queries sequentially, which would mean that it takes ~0.5 seconds in total using the current set-up.