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

select dijkstra() never returns #6911

Closed
ghost opened this issue Nov 14, 2016 · 2 comments
Closed

select dijkstra() never returns #6911

ghost opened this issue Nov 14, 2016 · 2 comments
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Nov 14, 2016

OrientDB Version, operating system, or hardware.

  • v2.2.13-SNAPSHOT

Operating System

  • [ x] Linux

Expected behavior

comparing with another function ...
orientdb {db=HumanPPI2}> SELECT shortestPath(#40:55,#33:0)

+----+---------------------------+
|# |shortestPath |
+----+---------------------------+
|0 |[#40:55,#34:133,#33:0]|
+----+----------------------------+

1 item(s) found. Query executed in 0.078 sec(s).

Actual behavior

orientdb {db=HumanPPI2}> SELECT dijkstra(#40:55, #33:0, 'Scale') FROM V
never returns- now 30 minutes, and counting...

Steps to reproduce the problem

download my database from google disk and check. please request share.

@luigidellaquila
Copy link
Member

Hi @austx

Could you please send me a backup of the db (a copy of the db folder)? It's the only way to preserve RIDs and reproduce the exact same scenario

Thanks!

Luigi

@luigidellaquila luigidellaquila self-assigned this Nov 15, 2016
@luigidellaquila luigidellaquila mentioned this issue Nov 15, 2016
4 tasks
luigidellaquila added a commit that referenced this issue Dec 13, 2016
@luigidellaquila
Copy link
Member

Hi @austx

I just pushed a fix for this on branch 2.2.x (porting it to develop).

Just a couple of notes:

  1. The fix is just an optimization, the old algorithm used an inefficient API to retrieve neighbor vertices.

  2. Please, use the following as a query

    SELECT dijkstra(#40:55, #33:0, 'Score')
    

    instead of

    SELECT dijkstra(#40:55, #33:0, 'Score') from V
    

    you definitely don't need the from V here.

On my machine it's still much slower than a simple ShortestPath (it takes a few minutes to execute), but the algorithm of a weighted path is more complex than a simple shortestPath, so it makes sense

Thanks

Luigi

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

No branches or pull requests

1 participant