简体   繁体   中英

Query Time OrientDB

How do I record time taken by query in OrientDB?

I have a huge database and I need to optimize my query. So I would need to record query time and compare them. I saw a post where this could be done in REST using applications like POSTMAN.

Is there a way to achieve this using OrientDB studio?

In v 2.2 the most accurate tool you have is EXPLAIN, eg.

 EXPLAIN SELECT FROM Foo WHERE name = 'bar'

will return a record with all the timing for the query.

OrientDB Studio shows query execution time in the browser window at every query execution, but the he problem with those stats is that by default Studio executes queries with LIMIT 20, so unless you explicitly change the default or declare LIMIT -1 you will have wrong stats.

After every query execution, OrientDB studio has something like this at the bottom of every query card.

Query executed in 0.107 sec. Returned 0 record(s). Limit: 20

This helped me in comparing multiple queries.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM