# Logstash Jdbc question

**URL:** <https://discuss.elastic.co/t/logstash-jdbc-question/48819>\
**Category:** Logstash\
**Created:** [April 29, 2016, 2:58pm UTC](https://discuss.elastic.co/t/logstash-jdbc-question/48819 "2016-04-29T14:58:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![maher](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@maher](https://discuss.elastic.co/u/maher)\
**Post date:** [April 29, 2016, 2:58pm UTC](https://discuss.elastic.co/t/logstash-jdbc-question/48819/1 "2016-04-29T14:58:39Z")

</div>

Hi,  
using logstash I could read data from Mysql.

-I am just asking if logstash reads the new data automaticly from data base?  
-is there a way to memorize the state of the data base to prevent logstash from loading old data. (like sincedb)?

Thank you!

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [April 30, 2016, 3:00pm UTC](https://discuss.elastic.co/t/logstash-jdbc-question/48819/2 "2016-04-30T15:00:06Z")

</div>

Yes, the jdbc input supports fetching just new/updated rows from the database. See the State section and the example in [the documentation](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html).

---

<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 6, 2017, 4:59am UTC](https://discuss.elastic.co/t/logstash-jdbc-question/48819/3 "2017-07-06T04:59:53Z")

</div>


