# Insert Vs Upsert performance

**URL:** <https://discuss.elastic.co/t/insert-vs-upsert-performance/65530>\
**Category:** Elasticsearch\
**Created:** [November 9, 2016, 5:00pm UTC](https://discuss.elastic.co/t/insert-vs-upsert-performance/65530 "2016-11-09T17:00:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![amolbpatil](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@amolbpatil](https://discuss.elastic.co/u/amolbpatil)\
**Post date:** [November 9, 2016, 5:00pm UTC](https://discuss.elastic.co/t/insert-vs-upsert-performance/65530/1 "2016-11-09T17:00:44Z")

</div>

Hi,  
This is what we are doing right now:

- Insert documents with ID. (i.e. we assign ID to each document)

I want to change insert to Upsert() because once in a while we may get documents which will map to same ID (and in that case we want to merge those). What are the performance implications assuming that most of the time (\>99%) we are going to create new document, and very rarely (i.e. \<1%) we will actually be merging document.

Is there a way for me to know average insertion/usertion time of ES ?

Thanks,  
..... Amol

---

<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:** [November 13, 2016, 8:19am UTC](https://discuss.elastic.co/t/insert-vs-upsert-performance/65530/2 "2016-11-13T08:19:00Z")

</div>

> [@amolbpatil](#):
>
> Is there a way for me to know average insertion/usertion time of ES ?

Test, and track the response times is really the only way.

---

<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:** [December 11, 2016, 8:19am UTC](https://discuss.elastic.co/t/insert-vs-upsert-performance/65530/3 "2016-12-11T08:19:07Z")

</div>

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