I'm using OrientDB in my project, what I really concern about is the performance. I created big data to test it, with 500 000 persons and 500 000 interests, and random relationships between persons and persons (2 496 540 relationships), and persons and interests(3 322 060 relationships).
What I need to do is to traverse vertexs and edges. I tried Gremlin. For persons who's friends less than 100, get mutual friends takes about 10-20 seconds, but if a person has thousands of friends, this cannot work, it takes too much time.
g.v(id).both('KNOWS').as('here').both('KNOWS').has('id', '10:20').back('here').dedup.email
Get friends recommendation would take about 40-50 seconds for persons who's friends less than 100, but the same thing when a person has thousands of friends.
x=[g.v(id)];g.v(id).both('KNOWS').aggregate(x).both('KNOWS').except(x).dedup.email
Is these any way for OrientDB to do such traverse fast?
OrientDB SQL traverse only support depth-first traverse, it seems impossible to find mutual friends between two persons, and friends recommendation is complex. Did I miss something?
Thanks for your answer!
Why don't start from 10:20 and cross the relationships from there instead of browsing all the database checking if that vertex is related to 10:20 ?