I have a NODE table and an EDGE table which defines the nodes and edges connecting them, respectively. I'd like to find the shortest path from A to B.
It's straightforward to implement Dijkstra's algorithm (the shortest path from A to B algorithm) in SQL using repeated selects. But this probably going to be incredibly slow. Putting it in a stored procedure probably won't help very much.
Does someone have an idea on how to obtain the shortest path in a more efficient manner?
It's straightforward to implement Dijkstra's algorithm (the shortest path from A to B algorithm) in SQL using repeated selects. But this probably going to be incredibly slow. Putting it in a stored procedure probably won't help very much.
Does someone have an idea on how to obtain the shortest path in a more efficient manner?