[英]Slow performant query in Arangodb
Hypothetically I have two collections. 假设我有两个收藏。
users (document type)
and relations (edge type)
users (document type)
和relations (edge type)
Relations collection has two attributes {user1, user2}
and is indexed combined. 关系集合具有两个属性{user1, user2}
并被索引合并。
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. 具有800个用户和5000个关系,需要35秒。
I didn't create the indexes properly before. 我之前没有正确创建索引。 I recreated the indexes again and then the performance was improved. 我再次重新创建了索引,然后性能得以提高。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.