Re: Indexing Strategies for RDF edges/predicates on Janusgraph
AMIYA KUMAR SAHOO
toggle quoted messageShow quoted text
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: