<div dir="ltr"><div>Hi,</div><div><br></div><div><br></div><div>I'm wondering if anyone has an example of a query that calculates routes between pairs of nodes  that is a subset of all the possible pairs in the network. <br></div><div><br></div><div>I have a network with ~5297 nodes, for ~28 million possible pairs. I could calculate routes for all of these pairs and then use the subset of routes that i need, but it seems that there could be a way to calculate only routes for the ~17 thousand pairs I actually care about.  If possible I would filter to only calculate pairs where the origin node is ST_DWITHIN(a.geom, b.geom, 250), for example.  <br></div><div><br></div><div>is there a way to pass the results of a query to the pgr_dijkstra() function? I haven't seen an example of that as I've read through the docs.  is there a way to apply a condition like st_diwthin() to the arrays passed to the function?</div><div><br></div><div>thanks for any advice or suggestions, hope everyone's week is off to a good start. <br></div><div><br></div><div>Hugh<br></div></div>