# Partial Update and nested type performance

**URL:** https://discuss.elastic.co/t/partial-update-and-nested-type-performance/110534
**Category:** Elasticsearch
**Created:** [December 6, 2017, 3:10pm UTC](https://discuss.elastic.co/t/partial-update-and-nested-type-performance/110534 "2017-12-06T15:10:19Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![acchaulk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/acchaulk/32/24345_2.png) [@acchaulk](https://discuss.elastic.co/u/acchaulk)
#### Post date: [December 6, 2017, 3:10pm UTC](https://discuss.elastic.co/t/partial-update-and-nested-type-performance/110534/1 "2017-12-06T15:10:19Z")

</div>

Is any performance advantage to do a scripted partial update for a nested field? The docs seem to indicate that "To update, add, or remove a nested object, we have to reindex the whole document". Other than sending a larger body, are there any performance advantages to performing a partial update?

---

<div class="post-metadata">

### Author: ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)
#### Post date: [December 9, 2017, 1:36am UTC](https://discuss.elastic.co/t/partial-update-and-nested-type-performance/110534/2 "2017-12-09T01:36:46Z")

</div>

Actually, the performance of using scripted update is worse If compared with just simply indexing. The reason is that a scripted update has an extra burden of loading and parsing the document and compiling and executing the update script.

You would use a scripted update because you need the custom update logic and not because of performance.

---

<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: [January 6, 2018, 1:37am UTC](https://discuss.elastic.co/t/partial-update-and-nested-type-performance/110534/3 "2018-01-06T01:37:05Z")

</div>

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