# Performance impact of upsert vs index with custom id

**URL:** <https://discuss.elastic.co/t/performance-impact-of-upsert-vs-index-with-custom-id/339492>\
**Category:** Elasticsearch\
**Created:** [July 28, 2023, 4:49am UTC](https://discuss.elastic.co/t/performance-impact-of-upsert-vs-index-with-custom-id/339492 "2023-07-28T04:49:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sriapr98](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sriapr98/32/121815_2.png) [@sriapr98](https://discuss.elastic.co/u/sriapr98)\
**Post date:** [July 28, 2023, 4:49am UTC](https://discuss.elastic.co/t/performance-impact-of-upsert-vs-index-with-custom-id/339492/1 "2023-07-28T04:49:47Z")

</div>

We have a huge traffic coming out of kafka which we are continuously ingesting to es using Index api(with custom doc id). Due to some edge cases we are thinking of moving to update api(upsert with doc\_as\_upsert with update and insert fields). Will there be any performance impact due to this? We won't be able to afford any lags here as expectation is it will be near real time. So wanted to be double sure if there will be any performance implications due to this.

---

<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:** [August 25, 2023, 4:50am UTC](https://discuss.elastic.co/t/performance-impact-of-upsert-vs-index-with-custom-id/339492/2 "2023-08-25T04:50:06Z")

</div>

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