# Logstash JDBC Plugin - optimal way to fetch new incoming data

**URL:** <https://discuss.elastic.co/t/logstash-jdbc-plugin-optimal-way-to-fetch-new-incoming-data/32441>\
**Category:** Logstash\
**Created:** [October 18, 2015, 7:48am UTC](https://discuss.elastic.co/t/logstash-jdbc-plugin-optimal-way-to-fetch-new-incoming-data/32441 "2015-10-18T07:48:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![samnik60](https://avatars.discourse-cdn.com/v4/letter/s/b19c9b/32.png) [@samnik60](https://discuss.elastic.co/u/samnik60)\
**Post date:** [October 18, 2015, 7:48am UTC](https://discuss.elastic.co/t/logstash-jdbc-plugin-optimal-way-to-fetch-new-incoming-data/32441/1 "2015-10-18T07:48:18Z")

</div>

Hi guys,

Aim : To take data from a oracle table at regular interval without overlapping data ( i.e data from first run doesnt show up in next run ) to a target .

problem : How to query the table for the above use case if it doesnt have an insertion time column.

Probable solution if this feature exists : since we dont have the insertion time column , if can  
store any other meta data from the query, apart from :sql\_last\_run, say for example the last records primary key , we can solve this problem. Does logstash jdbc plugin have such feature ?

If not then this plugin is useful only if we can add an insertion time column in the table.

Thanks,  
Sam.

---

<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, 5:26am UTC](https://discuss.elastic.co/t/logstash-jdbc-plugin-optimal-way-to-fetch-new-incoming-data/32441/2 "2017-07-06T05:26:16Z")

</div>


