We have this model :
Unit <- Person(pds) -> profession
(246515 vertex) <- (661491 V) -> (68 V)
A Unit is linked to less than 5 person.
We want to find the person for a specialty and a profession. For both, we have the id.
This request is very slow (7 seconds) :
MATCH
{class:pds, as:pds}.out('has_punit'){class:unit, where : (@rid = #104:11482)},
{as:pds}.out('has_pprofession'){class:profession, where : (@rid = #81:0)}
RETURN pds
In the documentation : change this: select from Profile where @rid = #10:44 with this: select from #10:44
Is it possible to use record ID as target in a Match query ?
Hi @bbourgois
Yes, instead of
MATCH {class:pds, as:pds, where:(@Rid = #104:11482)}...
you can use
MATCH {rid:#104:11482, as:pds}...
We introduced it as an experimental feature, so it's not documented yet, but it works definitely fine
Thanks
Luigi
Hi @luigidellaquila
The feature is so cool.
Is it more faster than query by where condition?
It's much faster. It's O(1), no matter the database size.
Most helpful comment
Hi @bbourgois
Yes, instead of
you can use
We introduced it as an experimental feature, so it's not documented yet, but it works definitely fine
Thanks
Luigi