# Does elasticsearch reduce bloating?

**URL:** <https://discuss.elastic.co/t/does-elasticsearch-reduce-bloating/118112>\
**Category:** Elasticsearch\
**Created:** [February 1, 2018, 10:30pm UTC](https://discuss.elastic.co/t/does-elasticsearch-reduce-bloating/118112 "2018-02-01T22:30:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Brooks](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@Jason\_Brooks](https://discuss.elastic.co/u/Jason_Brooks)\
**Post date:** [February 1, 2018, 10:30pm UTC](https://discuss.elastic.co/t/does-elasticsearch-reduce-bloating/118112/1 "2018-02-01T22:30:59Z")

</div>

Hello,

Does elasticsearch deduplicate data? I mean if there is a name/value combination in common for many events, does elasticsearch do any storage optimization?

For example,I have a large ( \>500,000) number of events. in each event is the "EventCode" field, and there are perhaps 20 unique Eventcodes. If this were sql, I would break these eventcodes into their own table and use a foreign key to significantly reduce disk storage, and complexity.

If elasticsearch doesn't do this out of the box, are there ways to provide hints to do this?

Thank you for your information and time...

--jason

---

<div class="post-metadata">

**Author:** ![Jason\_Brooks](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@Jason\_Brooks](https://discuss.elastic.co/u/Jason_Brooks)\
**Post date:** [February 1, 2018, 10:32pm UTC](https://discuss.elastic.co/t/does-elasticsearch-reduce-bloating/118112/2 "2018-02-01T22:32:55Z")

</div>

OOps: Did I say \>500,000 events? more like \> 8,305,270 events...

🙂

---

<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:** [February 1, 2018, 10:36pm UTC](https://discuss.elastic.co/t/does-elasticsearch-reduce-bloating/118112/3 "2018-02-01T22:36:37Z")

</div>

It does not deduplicate.  
It does compress, and there are two levels you can use - [https://www.elastic.co/guide/en/elasticsearch/reference/6.1/index-modules.html#index-codec](https://www.elastic.co/guide/en/elasticsearch/reference/6.1/index-modules.html#index-codec)

---

<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:** [March 1, 2018, 10:36pm UTC](https://discuss.elastic.co/t/does-elasticsearch-reduce-bloating/118112/4 "2018-03-01T22:36:45Z")

</div>

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