Re: Indexing Strategies for RDF edges/predicates on Janusgraph
Matthew Nguyen <nguyenm9@...>
toggle quoted message Show quoted text
Thanks for the clarification. That makes sense. I suppose if there were multiple edges from V(h) to V('mother') I would need to qualify it to insure the path exists?
eg V(h).out('mother').inE('isSon') vs V(h).out('mother').inE('battled')
From: AMIYA KUMAR SAHOO <amiyakr.sahoo91@...>
Sent: Mon, Jan 24, 2022 2:26 pm
Subject: Re: [janusgraph-users] Indexing Strategies for RDF edges/predicates on Janusgraph
Both of the example shows 2 different types of default index.
- This is example for default vertex-centric indexes per edge label
- This will help to traverse specific type of edge among different types of edge quickly.
- in your case to find all employees employedBy a company will use this.
- This is example for default vertex-centric indexes per property key.
- This will help to get the value of a single property among several properties of a single vertex
Now there can be a situation you can have 1k types of edges associated to a vertex (one company). Except emploedBy edge, other edges have less cardinality(let's say < 10). But 2k employees employedBy by that company. You want to find if company has a employee with name John. In this case if your your travesal starts from company and goes with employedBy edge, it has to traverse all 2k edges to find out whether John is an employee or not. This situation can be made faster if employee name is available on edge and there is a VCI enabled on it.
This might not be a very good example as it can be optimised in different ways
1) if employee have less degree for employedBy edge, you can start traversal from employee vertex.
Hope it helps,
On Tue, 25 Jan 2022, 00:01 Matthew Nguyen via lists.lfaidata.foundation, <nguyenm9=aol.com@...> wrote: