# The fetch phase time for queries is relatively slow

**URL:** <https://discuss.elastic.co/t/the-fetch-phase-time-for-queries-is-relatively-slow/359304>\
**Category:** Elastic Search\
**Created:** [May 11, 2024, 1:43pm UTC](https://discuss.elastic.co/t/the-fetch-phase-time-for-queries-is-relatively-slow/359304 "2024-05-11T13:43:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![csuchunpeng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/csuchunpeng/32/134396_2.png) [@csuchunpeng](https://discuss.elastic.co/u/csuchunpeng)\
**Post date:** [May 11, 2024, 1:43pm UTC](https://discuss.elastic.co/t/the-fetch-phase-time-for-queries-is-relatively-slow/359304/1 "2024-05-11T13:43:52Z")

</div>

Cluster mode, 3 nodes, each node can play both master and data roles, and the server configuration for each node is 16 cores and 64G. NumberOfShards=3, numberOfReplicas=1. The data volume for each shard is approximately 3G  
The total number of documents queried is approximately 6KW, and the type of query field is text. When from and size are 0 and 10, the query is within ms; When the from and size are 0 and 1000, the query occasionally appears for more than 10 seconds. After analyzing the profile, it was found that the bottleneck mainly occurs on load\_stored\_fields. Why is there such a big difference in query time? Through load\_stored\_fileds\_cout, it was found that there are only 3000, not particularly many. Why is time so slow

---

<div class="post-metadata">

**Author:** ![ashishtiwari1993](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashishtiwari1993/32/135241_2.png) [@ashishtiwari1993](https://discuss.elastic.co/u/ashishtiwari1993)\
**Post date:** [May 11, 2024, 4:53pm UTC](https://discuss.elastic.co/t/the-fetch-phase-time-for-queries-is-relatively-slow/359304/2 "2024-05-11T16:53:53Z")

</div>

@csuchunpeng Welcome to the Elastic community.

May i know how many fields you have stored per doc?

---

<div class="post-metadata">

**Author:** ![csuchunpeng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/csuchunpeng/32/134396_2.png) [@csuchunpeng](https://discuss.elastic.co/u/csuchunpeng)\
**Post date:** [May 16, 2024, 9:16am UTC](https://discuss.elastic.co/t/the-fetch-phase-time-for-queries-is-relatively-slow/359304/3 "2024-05-16T09:16:33Z")

</div>

About 6 fields per doc.  
For the same query conditions, slow queries mainly occur during the first time.  
If you enter the same query criteria again, the subsequent queries will be within milliseconds, which should be due to caching.  
Sorry, I currently do not have permission to upload images。  
Query criteria: A boost must combination query of two fields, with the first field being a match query and the second field being a terms query  
Profile result information:  
Node1: load\_stored\_fields: 98ms, load\_stored\_fields count: 3084;  
Node2: load\_stored\_fields: 98ms, load\_stored\_fields count: 3479;  
Node3: load\_stored\_fields: 8.1s, load\_stored\_fields count: 3437

---

<div class="post-metadata">

**Author:** ![csuchunpeng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/csuchunpeng/32/134396_2.png) [@csuchunpeng](https://discuss.elastic.co/u/csuchunpeng)\
**Post date:** [May 16, 2024, 9:24am UTC](https://discuss.elastic.co/t/the-fetch-phase-time-for-queries-is-relatively-slow/359304/4 "2024-05-16T09:24:07Z")

</div>

The following are images of the query criteria：

 ![query_dsl](https://us1.discourse-cdn.com/elastic/original/3X/0/1/0114536856d0dc53b6cf52ad132d2c7da7575327.jpeg)

---

<div class="post-metadata">

**Author:** ![csuchunpeng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/csuchunpeng/32/134396_2.png) [@csuchunpeng](https://discuss.elastic.co/u/csuchunpeng)\
**Post date:** [May 16, 2024, 9:26am UTC](https://discuss.elastic.co/t/the-fetch-phase-time-for-queries-is-relatively-slow/359304/5 "2024-05-16T09:26:05Z")

</div>

the result of profile in node1:

 ![node1](https://us1.discourse-cdn.com/elastic/original/3X/5/5/55eb8bede8b5eb45fbd11b640fb449d29c7a873d.jpeg)

---

<div class="post-metadata">

**Author:** ![csuchunpeng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/csuchunpeng/32/134396_2.png) [@csuchunpeng](https://discuss.elastic.co/u/csuchunpeng)\
**Post date:** [May 16, 2024, 9:26am UTC](https://discuss.elastic.co/t/the-fetch-phase-time-for-queries-is-relatively-slow/359304/6 "2024-05-16T09:26:50Z")

</div>

the result of profile in node2:

 ![node2](https://us1.discourse-cdn.com/elastic/original/3X/6/6/66a37d5dee26e4677106ad1f4505371c5f09efb0.jpeg)

---

<div class="post-metadata">

**Author:** ![csuchunpeng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/csuchunpeng/32/134396_2.png) [@csuchunpeng](https://discuss.elastic.co/u/csuchunpeng)\
**Post date:** [May 16, 2024, 9:27am UTC](https://discuss.elastic.co/t/the-fetch-phase-time-for-queries-is-relatively-slow/359304/7 "2024-05-16T09:27:27Z")

</div>

the result of profile in node3:

 ![node3](https://us1.discourse-cdn.com/elastic/original/3X/a/6/a60f76eee95e89c23fea29a7bfa0c2936d31c627.jpeg)

---

<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:** [June 13, 2024, 9:28am UTC](https://discuss.elastic.co/t/the-fetch-phase-time-for-queries-is-relatively-slow/359304/8 "2024-06-13T09:28:01Z")

</div>

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