# JDBC input scheduling issue - is it possible to run query a minute after the previous query finished

**URL:** <https://discuss.elastic.co/t/jdbc-input-scheduling-issue-is-it-possible-to-run-query-a-minute-after-the-previous-query-finished/185568>\
**Category:** Logstash\
**Created:** [June 13, 2019, 8:00am UTC](https://discuss.elastic.co/t/jdbc-input-scheduling-issue-is-it-possible-to-run-query-a-minute-after-the-previous-query-finished/185568 "2019-06-13T08:00:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrey\_Tomilin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrey_tomilin/32/77563_2.png) [@Andrey\_Tomilin](https://discuss.elastic.co/u/Andrey_Tomilin)\
**Post date:** [June 13, 2019, 8:00am UTC](https://discuss.elastic.co/t/jdbc-input-scheduling-issue-is-it-possible-to-run-query-a-minute-after-the-previous-query-finished/185568/1 "2019-06-13T08:00:51Z")

</div>

I'm using the Jdbc input to retrieve data from MS SQL database once a minute.  
Usually it works fine. But as we know database performance is not very reliable thing and sometime it's take longer than one minute to the query to return. Sometime event 5 minutes.  
But the Jdbc scheduler still run a query once a minute so there situations when multiple queries run at the same time. This creates additional pressure on a database and after some time there are 20 almost same queries run at the same time.

I assume I'm not the first person which encounter this problem. I'm sure there is some way to make Jdbc to run query a minute after the previous once is finished. Am I right?

---

<div class="post-metadata">

**Author:** ![Andrey\_Tomilin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrey_tomilin/32/77563_2.png) [@Andrey\_Tomilin](https://discuss.elastic.co/u/Andrey_Tomilin)\
**Post date:** [June 23, 2019, 7:48am UTC](https://discuss.elastic.co/t/jdbc-input-scheduling-issue-is-it-possible-to-run-query-a-minute-after-the-previous-query-finished/185568/2 "2019-06-23T07:48:11Z")

</div>

10 days without single comment. Great support here from Logstash team

---

<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 21, 2019, 7:48am UTC](https://discuss.elastic.co/t/jdbc-input-scheduling-issue-is-it-possible-to-run-query-a-minute-after-the-previous-query-finished/185568/3 "2019-07-21T07:48:25Z")

</div>

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