I have a graph with some rules and entities, of which one entity type is mostly isolated (not part of any relations but does act a role).
I’ve defined this entity type,
containment sub relation, relates container, relates containee; uuid sub attribute, value string; last-seen sub attribute, value datetime; user sub entity, has uuid, has last-seen, plays containee;
The attributes are only owned by
user. I currently have 5 user instances in my graph that I put in for testing, and when I run match queries I get severely degraded performance.
For example, consider the following query:
match $u isa user, has uuid "test"; get; offset 0; limit 1;
This query clocks in at ~100 calls over a 30 second period, which IMO is extremely slow considering how often we might want to get a very specific user from the database. More complex queries that involve querying the user with relations are exponentially slower.
However, it takes less than a second to complete 2000 insert queries (without match clauses). This leads me to believe there is some aspect of my entity definition or syntax that is resulting in very slow match queries.
I’m wondering where to even begin looking (or if this is actually expected speed)?