# Performance considerations on uid generation

**URL:** <https://discuss.elastic.co/t/performance-considerations-on-uid-generation/184718>\
**Category:** Elasticsearch\
**Created:** [June 7, 2019, 8:51am UTC](https://discuss.elastic.co/t/performance-considerations-on-uid-generation/184718 "2019-06-07T08:51:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vangap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vangap/32/44927_2.png) [@vangap](https://discuss.elastic.co/u/vangap)\
**Post date:** [June 7, 2019, 8:51am UTC](https://discuss.elastic.co/t/performance-considerations-on-uid-generation/184718/1 "2019-06-07T08:51:05Z")

</div>

I am trying to evaluate the best practices for ID generation in terms of index/query time performance and also storage; and stumbled upon this PR

> <https://github.com/elastic/elasticsearch/pull/25352>

- It sounds like there will be some benefits if I send base64 generated IDs?
- And also the length of the ID might also have some performance overhead?
- ~~Having a common prefix might improve compression?~~ turns out I didn't finish reading [https://github.com/elastic/elasticsearch/issues/18209](https://github.com/elastic/elasticsearch/issues/18209)

I would like to know if these are still valid in 7.x and is there any other documentation/blog posts where this is explained conclusively about the benefits?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 7, 2019, 10:17am UTC](https://discuss.elastic.co/t/performance-considerations-on-uid-generation/184718/2 "2019-06-07T10:17:44Z")

</div>

Have a look at the following resources:

> **[Efficient Duplicate Prevention for Event-Based Data in Elasticsearch](https://www.elastic.co/blog/efficient-duplicate-prevention-for-event-based-data-in-elasticsearch)**
>
> Need to prevent duplicates in the Elastic Stack with minimal performance impact? In this blog we look at different options in Elasticsearch and provide some practical guidelines.

[https://www.elastic.co/webinars/optimizing-storage-efficiency-in-elasticsearch](https://www.elastic.co/webinars/optimizing-storage-efficiency-in-elasticsearch)

---

<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 5, 2019, 10:17am UTC](https://discuss.elastic.co/t/performance-considerations-on-uid-generation/184718/3 "2019-07-05T10:17:47Z")

</div>

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