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
votes
1 Answers
1
votes
- Do you have an index against
Complaint.State? In this way the lookup is much faster. - 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
detailsas a set of links to theComplaint_Detailclass, the query would be much easier to write and fastselect expand(details) from Complaint where State='CA'