私は次のことを試しました:
arangosh [_system]> db._create("users");
[ArangoCollection 1252513721, "users" (type document, status loaded)]
arangosh [_system]> db._create("locations");
[ArangoCollection 1252644793, "locations" (type document, status loaded)]
arangosh [_system]> db._query("FOR i IN 1 .. 10000 INSERT { 'id': i, 'name': 'Name' } INTO users").toArray()
[ ]
arangosh [_system]> db._query("FOR i IN 1 .. 10000 INSERT { 'friends_id': i, 'name': 'Name' } INTO locations").toArray()
[ ]
arangosh [_system]> db.locations.ensureHashIndex("friends_id")
var a = db._query("FOR f IN users FOR l IN locations FILTER l.friends_id == f.id RETURN { 'u': f, 'l': l}")
これにより、1000 レコードが非常に高速に返されます。
「ensureHashIndex」を実行して、もう一度やり直していただけますか? 今は速くなりましたか?