# ElasticSearch Bulk API: Performance with smaller document upserts

**URL:** <https://discuss.elastic.co/t/elasticsearch-bulk-api-performance-with-smaller-document-upserts/18402>\
**Category:** Elasticsearch\
**Created:** [June 30, 2014, 5:44pm UTC](https://discuss.elastic.co/t/elasticsearch-bulk-api-performance-with-smaller-document-upserts/18402 "2014-06-30T17:44:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![George\_Coller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/george_coller/32/1443_2.png) [@George\_Coller](https://discuss.elastic.co/u/George_Coller)\
**Post date:** [June 30, 2014, 5:44pm UTC](https://discuss.elastic.co/t/elasticsearch-bulk-api-performance-with-smaller-document-upserts/18402/1 "2014-06-30T17:44:45Z")

</div>

For simplicity I wrote a single 'upsert' method in our DAO that will upsert  
one or more documents into ES using the \_bulk endpoint.

Thinking about it though now I'm worried that for single-doc upserts I may  
be forcing the ES server to do a lot more work since it doesn't know if  
it's receiving one or thousands of documents.

So, does anybody have a definitive answer? Should I split the DAO method  
to use one ES endpoint for single doc upserts and the bulk only when I'm  
loading many?

_TL;DR:_ Does the \_bulk endpoint use a lot more server resources for a  
handful of document inserts than using the normal document insert api?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e6c9f0c6-0d3c-445c-a3ca-a9d5e4b686b3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e6c9f0c6-0d3c-445c-a3ca-a9d5e4b686b3%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 1:18am UTC](https://discuss.elastic.co/t/elasticsearch-bulk-api-performance-with-smaller-document-upserts/18402/2 "2017-07-06T01:18:53Z")

</div>


