【问题标题】:OrientDB slow traversal after depth 4深度4后OrientDB慢遍历
【发布时间】:2016-04-01 06:48:46
【问题描述】:

OrientDB 遍历大于深度 3 后变慢。(深度 3 耗时 4 秒,深度 4 耗时 11,深度 5 耗时 37 秒)

我的查询是:TRAVERSE * FROM (select from products where pid = '73') while $depth

产品从 V 扩展而来,我有一个带有引擎 SBTree 的索引类型 UNIQUE(字段 pid)。 当我尝试深度 1 到 3 时工作正常。 我与 Neo4j 进行了比较,用相同的数据在深度 5 中花费了 3 秒。 我正在使用 OrientDB 2.1.5 请帮助我改善这一点。 谢谢。

【问题讨论】:

    标签: orientdb


    【解决方案1】:

    尝试使用:

    TRAVERSE * FROM (select from products where pid = '73') maxdepth 5
    

    您在第 4 级和第 5 级有多少条记录?

    【讨论】:

    • 是的,现在好多了。 while $depth
    • 现在的新时间是什么? maxdepth 5 停止在第 5 层,而使用条件 $depth<=5 遍历引擎必须到达深度 6(获取更多记录)才能返回 false。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-12-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-10
    相关资源
    最近更新 更多