-
Notifications
You must be signed in to change notification settings - Fork 49
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
[Bug] Neighbor expansion is slow and unreliable #324
Labels
bug
Something isn't working
exploration
Issues related to graph exploration, node & edge details, neighbor expansion, etc
performance
Issues relating to performance
reliability
Issues relating to improvements in reliability
Comments
Gremlin also seems to have issues when limiting the neighbors to expand in the side bar. This is the Gremlin generated to find 4 movies (limited to a max of 4) connected to Sean Connery: g.V(\"nm0000125\").
project(\"vertices\", \"edges\").
by(both().hasLabel(\"movie\").dedup().range(0, 4).fold()).
by(bothE().where(otherV().hasLabel(\"movie\")).dedup().fold()) Which returns the following and includes a lot of extra edges (75 in all) as there is no limit placed on the second
here is how it could also be written (simpler and no extra edges)
which returns
|
12 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
exploration
Issues related to graph exploration, node & edge details, neighbor expansion, etc
performance
Issues relating to performance
reliability
Issues relating to improvements in reliability
Community Note
Description
When performing neighbor expansion, the generated queries can be quite complex and resource intensive. Some create 50 or more network requests and can overwhelm the database server where the requests will begin to fail.
To Reproduce
Gremlin
I selected one node, and expanded 1 neighbor.
This second query will be repeated for each neighbor being expanded. So if you have 50 neighbors, you would have 50 requests.
openCypher
Expanding an author with 6 posts:
One request per neighbor, so 6 in this case:
SPARQL
Since the RDF data was different than PG data in the same Neptune instance, this is a single Airpot node expanding a single Country node. This resulted in 3 queries.
Expected behavior
Each language should be optimized. The query seems to be retrieving data for multiple parts of the app (graph and sidebar). We can split those tasks to further optimize, deferring the side bar work until needed.
Related issues
Tasks
The text was updated successfully, but these errors were encountered: