title: Calculating pairwise routing distances between a large number of GPS coordinates
body: <p>I have a web application where each user also has GPS coordinates (SqlGeography). As of now, I calculate the distance between two GPS coordinates as Euclidean distance with the <code>Distance</code> function.</p>
  
  <p>Some users have requested that I replace the approximated distance (in terms of air-line distance) with a more realistic distance. I'm thinking about using specific routing APIs (e.g., from Google, Here or Azure) to get a more realistic distance, for instance for a car ride.</p>
  
  <p>Currently, I have approximately 5000 different GPS coordinates and I would like to calculate and store a pair-wise distance for all of these pairs. This would result in 5000 * 5000 queries / requests which is very expensive. Is there any way how I can reduce the quadratic complexity with a trick I haven't thought of?</p>