# Logstash JDBC w/Elasticsearch: Managing space?

**URL:** https://discuss.elastic.co/t/logstash-jdbc-w-elasticsearch-managing-space/82725
**Category:** Elasticsearch
**Created:** [April 18, 2017, 1:57pm UTC](https://discuss.elastic.co/t/logstash-jdbc-w-elasticsearch-managing-space/82725 "2017-04-18T13:57:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![matt40413](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@matt40413](https://discuss.elastic.co/u/matt40413)
#### Post date: [April 18, 2017, 1:57pm UTC](https://discuss.elastic.co/t/logstash-jdbc-w-elasticsearch-managing-space/82725/1 "2017-04-18T13:57:57Z")

</div>

So I was unsure if this was really a logstash or elasticsearch question:

Basically I have JDBC logstash plugin sending to a AWS elasticsearch. Right now I have NOT set the document\_id so it's not getting over-written.

So everytime the SELECT SQL statement runs...is it just inserting a whole set of new documents? I guess how do we go about managing the data since we have a lot of sensor data in our project thats going to just keep getting written in.

Since elasticsearch/logstash don't know about "Delete's" im wondering how people handle the huge influxes of data. Should I be setting document\_id and allowing it to over-write? That just seems like it doesn't make as much sense.

---

<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: [April 18, 2017, 9:46pm UTC](https://discuss.elastic.co/t/logstash-jdbc-w-elasticsearch-managing-space/82725/2 "2017-04-18T21:46:26Z")

</div>

Setting doc ID would make sense.  
As would using time based indices.

---

<div class="post-metadata">

### Author: ![matt40413](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@matt40413](https://discuss.elastic.co/u/matt40413)
#### Post date: [April 19, 2017, 6:21pm UTC](https://discuss.elastic.co/t/logstash-jdbc-w-elasticsearch-managing-space/82725/3 "2017-04-19T18:21:33Z")

</div>

If I set doc ID i'd be just refreshing the one document correct? I guess i wouldn't be able to see things over-time, especially if sensors are removed for example if my one worry?

---

<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: [May 17, 2017, 6:26pm UTC](https://discuss.elastic.co/t/logstash-jdbc-w-elasticsearch-managing-space/82725/4 "2017-05-17T18:26:04Z")

</div>

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