Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgr_dijkstra combinations SQL #1359

Closed
mahmsakr opened this issue May 28, 2020 · 0 comments
Closed

pgr_dijkstra combinations SQL #1359

mahmsakr opened this issue May 28, 2020 · 0 comments

Comments

@mahmsakr
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants