Replies: 1 comment 1 reply
-
|
the answer seems to be related to a performance issue > d=Time.now;
DB.query(" match { rid: #449:6 } .out('has_contract'){ type: option, as: o} return o.symbol " );
d1=Time.now;
d1-d
=> 7.051627489
> d=Time.now;DB.query(" match { type: strategie, where: ( @rid= #449:6 ) } .out('has_contract'){ type: option, as: o} return o.symbol " );d1=Time.now; d1-d
=> 0.020200254
> d=Time.now;DB.query(" match { type: strategie, where: ( @rid= #449:6 ) } .out('has_contract'){ type: option, as: o} return o.symbol " );d1=Time.now; d1-d
=> 0.017033833but > d=Time.now;
DB.query(" match { type: strategie, rid: #449:6 }
.out('has_contract'){ type: option, as: o}
return o.symbol " );
d1=Time.now;
d1-d
=> 0.012890254is the most efficient query |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
According to the documentation, a MATCH-statement starts with "Match {type: ... [, as: ... ][, where: ... ] }"
If the rid is known, one ends with: "Match { type: the_database_type, where: ( @Rid = #1:0 ) }"
Surprisingly (for me) "Match { rid: #1:0 } " also works.
It seems, that "where: ( @Rid = #x:y ) } can generally substituted by "rid: #x:y"
My Question: Is it safe to use "rid: #x:y" in match queries, if yes: why is it missing in the documentation.
Thanks.
hartmut
Beta Was this translation helpful? Give feedback.
All reactions