在 orientdb 中获取数据需要花费大量时间

Data fetching taking so much time in orientdb

在 Orientdb 中,当我 运行 在服务器上查询 100000 条记录时,我必须获取几千条记录,这要花很多时间。 在我的例子中,要获取 600 条记录,orientdb 需要 6 分钟。 请建议我我的查询有什么问题。 Select 来自 Complaint_Detail where Complaint_ID in(Select Complaint_Id from Complaint where State='CA') limit 100 对于上述查询,它需要 48 秒。 请帮我找到解决方案

  1. 你有针对 Complaint.State 的索引吗?这样查找就快多了。
  2. 您正在使用 OrientDB 作为关系 DBMS,而您应该为记录创建 link 而不是存储 IDs.In 这种情况,如果您创建 属性 11=] 作为一组 link 到 Complaint_Detail class,查询将更容易编写并且速度更快 select expand(details) from Complaint where State='CA'