You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My program needs to compute the shortest path between millions of (source, target) combinations on the same edges_table. It is very inefficient to do millions of calls to pgr_dijkstra, each of which will construct the same graph from the edges_table.
An efficient way to do it is to add a new signature as follows:
pgr_dijkstra(
edges_sql,
combinations_sql, -- a table (possibly big) of with two attributes source, target
directed)
Like this, one call will constrcut the graph once, and compute as many shortest paths as returned by the combinations_sql.
The text was updated successfully, but these errors were encountered:
My program needs to compute the shortest path between millions of (source, target) combinations on the same edges_table. It is very inefficient to do millions of calls to pgr_dijkstra, each of which will construct the same graph from the edges_table.
An efficient way to do it is to add a new signature as follows:
pgr_dijkstra(
edges_sql,
combinations_sql, -- a table (possibly big) of with two attributes source, target
directed)
Like this, one call will constrcut the graph once, and compute as many shortest paths as returned by the combinations_sql.
The text was updated successfully, but these errors were encountered: