I use a river network on which has a lot of nodes to test pgRouting,
and I run the SQL, searching for the shortest path between nodes.
SELECT * FROM shortest_path('
SELECT gid as id,
start_id::int4 AS source,
end_id::int4 AS target,
shape_leng::double precision as cost
FROM network',
10, 20, false, false)
But if I want to search for the distance between node#10 and node#21, I need to type the code again and run the SQL.
The result below is parts of distance from node#10 to node#20, but I want is the total distance from starting node to ending node.
In my case, I have 159 nodes and I want to know if there are more efficient way using pgRouting?(like type the SQL code once and I can get all total distance between all nodes)