Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有什么简单的方法可以像 mongodb 中的 .explain() 一样在 couchbase 服务器的 N1QL 中获取查询时间?
我有一个类似的查询SELECT c.name, c.description from customer c,我想追踪时间。
SELECT c.name, c.description from customer c
在 中N1QL,响应是 JSON 并包含元数据。该metrics字段包含统计信息,包括执行查询所花费的时间(尤其是elapsedTime和executionTime)。
N1QL
metrics
elapsedTime
executionTime
在2.2.0 developer previewJava SDK 中,您可以QueryMetrics使用info().QueryResult
2.2.0 developer preview
QueryMetrics
info()
QueryResult