gpt4 book ai didi

elasticsearch - 如何找到elasticsearch查询的执行时间

转载 作者:行者123 更新时间:2023-12-03 00:34:16 27 4
gpt4 key购买 nike

我正在使用 elasticsearch 从 Rails 应用程序中快速获取结果。我想知道执行特定查询需要多长时间?有什么工具可以让我找到并比较执行时间以便优化查询吗?

最佳答案

响应对象中的'take'属性是以毫秒为单位的执行时间。例如:

{
"took" : 17,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}
}

关于elasticsearch - 如何找到elasticsearch查询的执行时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60186393/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com