I understand we can create classes and classes have their own clusters (files).
I would like to understand what actually is read in the case where I go from one class to another using an edge. Given this as imaginary example:
- Group (name)
- Company (name)
- Employee (name)
- Room (location)
These classes have only one supertype
Group ---- contains -----> Company — employs ----> Employee ----- occupies ----> Room
Given this query:
SELECT name AS employee_name, out('occupies').location AS rooms FROM `Employee` WHERE in('employs').in('contains').name = 'my holding';
The main questions
- Is going through the edge
employsgoing to scan the whole data set (all clusters) of
Companyclass for each single found Employee vertex?
WHERE in('employs').in('contains')- will the edge
Groupclass for each found vertex through
- If class Group would have index on
name, would it be used with
in('contains').name = 'my holding'? Asking as I have an index in that case but
EXPLAIN PLANdoesn’t mention it’s usage.
- What I can do to have best performance when going through a few edges in the WHERE clause to filter out something?