Hi
I have some questions about the slow log took time
I want to only get the process time in elasticsearch server using esrally to do the benchmark
So I opened the slow log like below
PUT /myIndex/_settings
{
"index.search.slowlog.threshold.fetch.trace": "0s",
"index.search.slowlog.threshold.query.trace": "0s",
}
then I can find all the slow logs in the elastic-cloud-logs* index, but if I run a query ,there will be two documents logged , one component is query and another is fetch, so which time should I use as the total processing time in es including both query and fetch phase
query phase log
{
"slowlog": {
"cluster": {},
"elasticsearch.slowlog.search_type": "QUERY_THEN_FETCH",
"elasticsearch.slowlog.took": "278.3micros",
"elasticsearch.slowlog.message": "[5c43591a_608d_493f_94aa_5da18abecabc][0]",
"elasticsearch.slowlog.stats": "[]",
"elasticsearch.slowlog.source": "{}",
"elasticsearch.slowlog.id": "null",
"node": {},
"elasticsearch.slowlog.total_shards": "1",
"elasticsearch.slowlog.took_millis": "0",
"elasticsearch.slowlog.total_hits": "10001+ hits"
}
}
fetch phase log
{
"slowlog": {
"cluster": {},
"elasticsearch.slowlog.search_type": "QUERY_THEN_FETCH",
"elasticsearch.slowlog.took": "1.4ms",
"elasticsearch.slowlog.message": "[5c43591a_608d_493f_94aa_5da18abecabc][0]",
"elasticsearch.slowlog.stats": "[]",
"elasticsearch.slowlog.source": "{}",
"elasticsearch.slowlog.id": "null",
"node": {},
"elasticsearch.slowlog.total_shards": "1",
"elasticsearch.slowlog.took_millis": "1",
"elasticsearch.slowlog.total_hits": "10001+ hits"
}
}
Does the "elasticsearch.slowlog.took": "278.3micros" includes both the query and fetch phase time or need to add the time in fetch phase ?
Thanks