# High latency issue with inner\_hits

**URL:** <https://discuss.elastic.co/t/high-latency-issue-with-inner-hits/341375>\
**Category:** Elasticsearch\
**Created:** [August 22, 2023, 1:46pm UTC](https://discuss.elastic.co/t/high-latency-issue-with-inner-hits/341375 "2023-08-22T13:46:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gilat\_Naveh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gilat_naveh/32/124674_2.png) [@Gilat\_Naveh](https://discuss.elastic.co/u/Gilat_Naveh)\
**Post date:** [August 22, 2023, 1:46pm UTC](https://discuss.elastic.co/t/high-latency-issue-with-inner-hits/341375/1 "2023-08-22T13:46:56Z")

</div>

I’m trying to install a new cluster on ECK (version 8.8.1) and I’m having latency issues (~300ms).  
We already have a similar cluster working in version 6.5.3 (EC2) and for the same query timing is good (~20ms)  
The query structure has a nested query and inner\_hits part:

```auto

"inner_hits": {
  "size": 100,
  "_source": false,
  "docvalue_fields": [
     "products.code"
   ]
}

```

When running the profiling API i’m getting the bottleneck is in the InnerHitsPhase :

```auto

{
  "type": "InnerHitsPhase",
  "description": "",
  "time_in_nanos": 58284286,
  "breakdown": {
  "process_count": 73,
  "process": 58283846,
  "next_reader": 440,
  "next_reader_count": 1
}

```

In terms of resources - There is no stat that indicates a limitation  
Is there a configuration that can influence the inner\_hits phase timing? (edited)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 19, 2023, 1:47pm UTC](https://discuss.elastic.co/t/high-latency-issue-with-inner-hits/341375/2 "2023-09-19T13:47:07Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
