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

Queries slow when no type on bound nodes #61

Open
cbizon opened this issue Jun 22, 2022 · 0 comments
Open

Queries slow when no type on bound nodes #61

cbizon opened this issue Jun 22, 2022 · 0 comments
Assignees

Comments

@cbizon
Copy link
Contributor

cbizon commented Jun 22, 2022

In a trapi qnode, you can give ids and/or categories. If you give an id, but no category, the query is possibly going to be slow. This is because the underlying graph has indices to find nodes with identifiers, but neo4j bases its indices on labels (categories). So since the generated cypher doesn't know what type the thing is, the index is not hit, and the planner does stupid (and slow) things.

The fix is probably simply to ensure that bound qnodes always have a category, of at least "NamedThing". This could be done as a pre-process on the trapi input or in the (already somewhat convoluted) cypher generation.

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

No branches or pull requests

2 participants