# How fast can elastic search records be read?

**URL:** <https://discuss.elastic.co/t/how-fast-can-elastic-search-records-be-read/152494>\
**Category:** Elasticsearch\
**Created:** [October 15, 2018, 1:05pm UTC](https://discuss.elastic.co/t/how-fast-can-elastic-search-records-be-read/152494 "2018-10-15T13:05:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arik\_Halperin](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@Arik\_Halperin](https://discuss.elastic.co/u/Arik_Halperin)\
**Post date:** [October 15, 2018, 1:05pm UTC](https://discuss.elastic.co/t/how-fast-can-elastic-search-records-be-read/152494/1 "2018-10-15T13:05:12Z")

</div>

We have a system that from one side writes information, and on the other sides reads the data.  
I synchronize the data based on a timestamp. I read data from a point in time, arrange it according to the timestamp and continue reading from the last timestamp I got.  
I noticed that if I always read the latest data, i miss some data which is written out of order, so instead I added a delay of 1 minute, and now everything is fine.  
My question is, what is the minimal delay I should use? In other words, what is the "settling time" of written records, and does it depend on the throughput of data?

With Best Regards,  
Arik Halperin

---

<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 15, 2018, 1:54pm UTC](https://discuss.elastic.co/t/how-fast-can-elastic-search-records-be-read/152494/2 "2018-10-15T13:54:06Z")

</div>

Once you have the response of elasticsearch, it can take up to 1s before the document is actually searchable. This is called `refresh`.  
You can also make your index query wait for the next refresh to happen in order to send back the index response.

---

<div class="post-metadata">

**Author:** ![Arik\_Halperin](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@Arik\_Halperin](https://discuss.elastic.co/u/Arik_Halperin)\
**Post date:** [October 15, 2018, 4:01pm UTC](https://discuss.elastic.co/t/how-fast-can-elastic-search-records-be-read/152494/3 "2018-10-15T16:01:38Z")

</div>

Thank you!

I think I will set the delay time to 2 seconds then, should fit my requirements and provide good safety for read operation.

---

<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 15, 2018, 4:16pm UTC](https://discuss.elastic.co/t/how-fast-can-elastic-search-records-be-read/152494/4 "2018-10-15T16:16:24Z")

</div>

Would be more efficient to use `refresh=wait_for` option IMHO.

---

<div class="post-metadata">

**Author:** ![Arik\_Halperin](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@Arik\_Halperin](https://discuss.elastic.co/u/Arik_Halperin)\
**Post date:** [October 15, 2018, 4:37pm UTC](https://discuss.elastic.co/t/how-fast-can-elastic-search-records-be-read/152494/5 "2018-10-15T16:37:57Z")

</div>

Well, I’m worried about this:

[https://discuss.elastic.co/t/what-would-cause-refresh-wait-for-to-regularly-take-2-5-seconds/106369/8](https://discuss.elastic.co/t/what-would-cause-refresh-wait-for-to-regularly-take-2-5-seconds/106369/8)

I don’t mind the delay, but I can’t wait for a query for more than a second.

Arik

---

<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 15, 2018, 6:11pm UTC](https://discuss.elastic.co/t/how-fast-can-elastic-search-records-be-read/152494/6 "2018-10-15T18:11:30Z")

</div>

Wait for is used at index time.

---

<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 12, 2018, 6:23pm UTC](https://discuss.elastic.co/t/how-fast-can-elastic-search-records-be-read/152494/7 "2018-11-12T18:23:10Z")

</div>

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