# Decrease query delay time in ML jobs

**URL:** <https://discuss.elastic.co/t/decrease-query-delay-time-in-ml-jobs/276058>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-machine-learning\
**Created:** [June 15, 2021, 9:41pm UTC](https://discuss.elastic.co/t/decrease-query-delay-time-in-ml-jobs/276058 "2021-06-15T21:41:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElasticLiver](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticliver/32/64869_2.png) [@ElasticLiver](https://discuss.elastic.co/u/ElasticLiver)\
**Post date:** [June 15, 2021, 9:41pm UTC](https://discuss.elastic.co/t/decrease-query-delay-time-in-ml-jobs/276058/1 "2021-06-15T21:41:22Z")

</div>

Hi, I get data from a database using logstash every 5 minutes. my bucket span is 15 minutes, and, because I was missing documents in the datafeed of the job, my query delay is 23 minutes.

What would you recomend to decrease the query delay?

will it help if I change to 1 minute the schedule of the logstash pipeline?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 16, 2021, 1:25am UTC](https://discuss.elastic.co/t/decrease-query-delay-time-in-ml-jobs/276058/2 "2021-06-16T01:25:01Z")

</div>

That'd likely help, yes.

---

<div class="post-metadata">

**Author:** ![ElasticLiver](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticliver/32/64869_2.png) [@ElasticLiver](https://discuss.elastic.co/u/ElasticLiver)\
**Post date:** [June 16, 2021, 2:13am UTC](https://discuss.elastic.co/t/decrease-query-delay-time-in-ml-jobs/276058/3 "2021-06-16T02:13:40Z")

</div>

Thanks @warkolm! Do you have another recommendation to decrease the query delay?

---

<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:** [July 14, 2021, 2:14am UTC](https://discuss.elastic.co/t/decrease-query-delay-time-in-ml-jobs/276058/4 "2021-07-14T02:14:22Z")

</div>

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