简体   繁体   English

查询时间OrientDB

[英]Query Time OrientDB

How do I record time taken by query in OrientDB? 如何在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. 我看到了一篇帖子 ,其中可以使用RESTMAN之类的应用程序在REST中完成此操作。

Is there a way to achieve this using OrientDB studio? 有没有一种方法可以使用OrientDB studio来实现?

In v 2.2 the most accurate tool you have is EXPLAIN, eg. 在v 2.2中,您拥有的最准确的工具是EXPLAIN,例如。

 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. OrientDB Studio在每次执行查询时都会在浏览器窗口中显示查询执行时间,但是这些统计信息的问题在于,默认情况下Studio执行LIMIT 20的查询,因此除非您明确更改默认值或声明LIMIT -1 ,否则统计信息将错误。

After every query execution, OrientDB studio has something like this at the bottom of every query card. 每次查询执行后,OrientDB Studio在每个查询卡的底部都有类似的内容。

Query executed in 0.107 sec. 查询在0.107秒内执行。 Returned 0 record(s). 返回了0条记录。 Limit: 20 上限:20

This helped me in comparing multiple queries. 这有助于我比较多个查询。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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