Data fetching taking so much time in orientdb

82 views Asked by At

In Orientdb when I am running queries on Server for 100000 records and i have to fetch some thousands records,it's taking so much time . in my case to fetch 600 records, 6 minutes taken by orientdb. please suggest me what am i doing wrong with my queries. Select From Complaint_Detail where Complaint_ID in(Select Complaint_Id from Complaint where State='CA') limit 100 for the above query it takes 48 sec. please help me to find solution

1

There are 1 answers

3
Lvca On BEST ANSWER
  1. Do you have an index against Complaint.State? In this way the lookup is much faster.
  2. You're using OrientDB as a Relational DBMS, while you should create a link to the records instead of storing the IDs.In this case if you create a property details as a set of links to the Complaint_Detail class, the query would be much easier to write and fast select expand(details) from Complaint where State='CA'