I'm using the ElasticSearch profile API to help with a slow query.
When I read the elasticsearch profiling docs it sounded like the time_in_nanos
value for queries in the shards should be less than the total took
time when running a profiling query.
However, I got the following results back:
{
"took": 109695,
...
"profile": {
"shards": [
{
"searches": [
{
"query": [
{
"type": "BooleanQuery",
"time": "1550750.786ms",
"time_in_nanos": 1550750786163
...
}
]
}
]
}
...
]
}
}
So, I see that the query took
109695
ms ~= 109
seconds which seems about right.
However, I see the 1550750786163
value for time_in_nanos
which corresponds to over 20
minutes. This does not match the took
value. The curl
command took about 2 minutes so the took
time seems accurate while the time_in_nanos
time does not seem accurate.
What is the correct way to interpret the time_in_nanos
value in an ElasticSearch profile query?
ES version: 5.6
took
should be<=
thantime_in_nanos
in the same query, right? Or am I misunderstanding something?