Deepak Agarwal
Deepak Agarwal

Reputation: 905

Slow performant query in Arangodb

Hypothetically I have two collections.

users (document type)and relations (edge type)

Relations collection has two attributes {user1, user2} and is indexed combined.

My following query is extremely slow:

FOR r in relations filter (r.user1 == 'xyz' && r.user2 == 'abc') || (r.user1 == 'abc' && r.user2 == 'xyz') RETURN r

With 800 users and 5000 relationship it takes 35 seconds.

Upvotes: 0

Views: 165

Answers (1)

Deepak Agarwal
Deepak Agarwal

Reputation: 905

I didn't create the indexes properly before. I recreated the indexes again and then the performance was improved.

Upvotes: 3

Related Questions