# Elsaticsearch everyday, first search is slow and rest are fine

**URL:** <https://discuss.elastic.co/t/elsaticsearch-everyday-first-search-is-slow-and-rest-are-fine/201506>\
**Category:** Elasticsearch\
**Created:** [September 28, 2019, 8:01pm UTC](https://discuss.elastic.co/t/elsaticsearch-everyday-first-search-is-slow-and-rest-are-fine/201506 "2019-09-28T20:01:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![shani\_angarkadu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shani_angarkadu/32/50638_2.png) [@shani\_angarkadu](https://discuss.elastic.co/u/shani_angarkadu)\
**Post date:** [September 28, 2019, 8:01pm UTC](https://discuss.elastic.co/t/elsaticsearch-everyday-first-search-is-slow-and-rest-are-fine/201506/1 "2019-09-28T20:01:42Z")

</div>

My first search every morning is very slow and the rest of the searches for that day is good. I have read few related questions, answers are too old.

Could you please help me with this.

Thank you!!

---

<div class="post-metadata">

**Author:** ![gabriel\_tessier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gabriel_tessier/32/27911_2.png) [@gabriel\_tessier](https://discuss.elastic.co/u/gabriel_tessier)\
**Post date:** [September 29, 2019, 2:23pm UTC](https://discuss.elastic.co/t/elsaticsearch-everyday-first-search-is-slow-and-rest-are-fine/201506/2 "2019-09-29T14:23:41Z")

</div>

Hi @shani_angarkadu

Can you provide more information about your configuration does your server start just before making the search? Do you run a snapshot during the search? What is your search? if you run the same request later in the day is it same speed?  
How much is it slow? How much time does it take?

Too much question. 😁

---

<div class="post-metadata">

**Author:** ![shani\_angarkadu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shani_angarkadu/32/50638_2.png) [@shani\_angarkadu](https://discuss.elastic.co/u/shani_angarkadu)\
**Post date:** [October 11, 2019, 3:13pm UTC](https://discuss.elastic.co/t/elsaticsearch-everyday-first-search-is-slow-and-rest-are-fine/201506/3 "2019-10-11T15:13:14Z")

</div>

1. does your server start just before making the search? Server is always up.
2. Do you run a snapshot during the search? No, the Indexes are updated once in a week.
3. What is your search? just a `GET` call with few search words
4. if you run the same request later in the day is it same speed? Nope. it takes only 9 secs
5. How much is it slow? around 38 sec higher than the regular 9 sec

---

<div class="post-metadata">

**Author:** ![gabriel\_tessier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gabriel_tessier/32/27911_2.png) [@gabriel\_tessier](https://discuss.elastic.co/u/gabriel_tessier)\
**Post date:** [October 14, 2019, 2:34pm UTC](https://discuss.elastic.co/t/elsaticsearch-everyday-first-search-is-slow-and-rest-are-fine/201506/4 "2019-10-14T14:34:07Z")

</div>

> [@shani\_angarkadu](#):
>
> it takes only 9 secs

😯

9 sec is slow, you have lot of data and it take time to build the cache!!

More question:

which version?  
How much data?  
If you run a GET my\_index/my\_doc/1 is it normal speed \<--- simple get by id which is usually fast \< 0.01 sec  
if it's slow you can remove the source as explain in the documentation, it can help to understand if your documents are big and make things slow.

> **[Get API | Elasticsearch Guide \[7.4\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/docs-get.html)**

---

<div class="post-metadata">

**Author:** ![shani\_angarkadu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shani_angarkadu/32/50638_2.png) [@shani\_angarkadu](https://discuss.elastic.co/u/shani_angarkadu)\
**Post date:** [October 18, 2019, 3:32pm UTC](https://discuss.elastic.co/t/elsaticsearch-everyday-first-search-is-slow-and-rest-are-fine/201506/5 "2019-10-18T15:32:12Z")

</div>

It has 25 million records and search is on text fields but first search is like 38 secs.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 18, 2019, 4:13pm UTC](https://discuss.elastic.co/t/elsaticsearch-everyday-first-search-is-slow-and-rest-are-fine/201506/6 "2019-10-18T16:13:31Z")

</div>

Could you tell:

- What kind of hardware do you have? SSD drives, spinning disks, network drive?
- What is a typical query you are running?
- What does a typical document look like?

---

<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:** [November 15, 2019, 4:13pm UTC](https://discuss.elastic.co/t/elsaticsearch-everyday-first-search-is-slow-and-rest-are-fine/201506/7 "2019-11-15T16:13:34Z")

</div>

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