我是ArangoDB的新手,正在努力优化我的查询,并希望得到一些帮助。
下面提供的查询是我正在苦苦挣扎的一个真实例子,在我的开发数据库上需要 758.078 毫秒,但在具有更大数据集的暂存库中需要 531.511 秒。
我还将提供我在开发和暂存中遍历的每个边缘表的大小。非常感谢任何帮助。
for doc in document
filter repo._key == "my-key"
for v, e, p in 3 any doc edge1, edge2, edge3
options {uniqueVertices: 'global', bfs: true}
filter DATE_ISO8601(p.vertices[2].date) > DATE_ISO8601("2017-09-04T00:00:01Z")
and DATE_ISO8601(p.vertices[2].date) < DATE_ISO8601("2017-09-15T23:59:59Z")
limit 1
return {
commit: p.vertices[2].hash,
date: p.vertices[2].date,
message: p.vertices[2].message,
author: p.vertices[1].email,
loc: p.vertices[3].stats.additions
}
DEV
- 边缘1: 2,638
- 边缘2: 2,560
- 边缘3: 386
STAGING
- 边缘1: 5,438,811
- 边缘2: 5,544,028
- 边缘3: 423,545