Closed amirrezamahyari closed 5 years ago
Hi @amirrezamahyari As i see the two different query appears here . First of all you must be implement same query in orientjs to compare results . I guess this is not related to orientjs , but you must improve your query plan for better result .
hi @saeedtabrizi
i also testdb.query('SELECT * FROM Job WHERE status="waiting" AND queue=#27:0 AND queue.status="resume" ORDER BY timestamp asc, priority asc LIMIT 3')
but same result its take time about 20 sec ...
in orientdb studio it take 0.044 sec
Hi @amirrezamahyari
which API are you using of OrientJS.
This
http://orientdb.com/docs/3.0.x/orientjs/OrientJS-Legacy.html
Or this
http://orientdb.com/docs/3.0.x/orientjs/OrientJS.html
Thanks
Hi @wolf4ood i use legacy
Hi @amirrezamahyari
that should explains the difference with Studio. Studio and OrientJS 3.0 with new API uses the new parser/executor in OrientDB 3.0.x while the legacy api for backward compatibility uses the old parser/executor.
Try the new OrientJS API, and let me know if it's the case.
Thanks
@wolf4ood after move to new api everything is fine , thanks
Hi i have a class with 2m records when i run query in orientdb studio , query runs in 0.044 sec
SELECT * FROM Job WHERE status='waiting' AND queue=#27:0 AND queue.status='resume' ORDER BY timestamp asc, priority asc LIMIT 3
but same query in orientjs takes about 20 sec
when i remove
.order(["timestamp ASC", " priority ASC"])
line its better and runs in 3sec. all fields i used in query have index...orientjs: 3.0.8 orientdb:3.0.24