【问题标题】:Data fetching taking so much time in orientdb在 orientdb 中获取数据需要很长时间
【发布时间】:2017-01-09 10:23:10
【问题描述】:

在 Orientdb 中,当我在服务器上运行 100000 条记录的查询时,我必须获取数千条记录,这需要很长时间。 就我而言,获取 600 条记录,由 orientdb 花费了 6 分钟。 请告诉我我的查询做错了什么。 Select From Complaint_Detail where Complaint_ID in(Select Complaint_Id from Complaint where State='CA') limit 100 对于上述查询,它需要 48 秒。 请帮我找到解决办法

【问题讨论】:

    标签: orientdb orientdb2.2


    【解决方案1】:
    1. 您有针对Complaint.State 的索引吗?这样查找速度会快很多。
    2. 您将 OrientDB 用作关系 DBMS,而您应该创建指向记录的链接而不是存储 ID。在这种情况下,如果您创建属性 details 作为一组指向 Complaint_Detail 类的链接,查询将更容易编写和快速select expand(details) from Complaint where State='CA'

    【讨论】:

    • 感谢 Lvca....我需要您的更多帮助....对于图 A-------->B---------> 的以下结构C-------->D 现在从查询中获取 A 和 D 的属性...我该怎么做.....??
    • 最好的方法是使用模式匹配,它让你的生活更轻松。看看:orientdb.com/pattern-matching-with-orientdb
    • ---你好 Lvca 我在 stackoverflow 上发布了一个问题。请你看看。我需要你的帮助stackoverflow.com/questions/49027672/…
    猜你喜欢
    • 2020-05-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-31
    • 1970-01-01
    相关资源
    最近更新 更多