# Elastic field include exclude performance

**URL:** https://discuss.elastic.co/t/elastic-field-include-exclude-performance/245255
**Category:** Elasticsearch
**Created:** [August 17, 2020, 2:54pm UTC](https://discuss.elastic.co/t/elastic-field-include-exclude-performance/245255 "2020-08-17T14:54:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![aniaks](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@aniaks](https://discuss.elastic.co/u/aniaks)
#### Post date: [August 17, 2020, 2:54pm UTC](https://discuss.elastic.co/t/elastic-field-include-exclude-performance/245255/1 "2020-08-17T14:54:09Z")

</div>

Is performance bad when applying include or exclude on a field? currently we apply top filter and then apply include or exclude on a field , in this situation is it going to affect the performance?

---

<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: [August 18, 2020, 5:46am UTC](https://discuss.elastic.co/t/elastic-field-include-exclude-performance/245255/2 "2020-08-18T05:46:44Z")

</div>

Including of excluding fields will mean the source document need to be parsed and altered, which is extra work. Exactly how much this affects performance will depend on the size and complexity of your documents as well as the number of documents returned in the query.

---

<div class="post-metadata">

### Author: ![aniaks](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@aniaks](https://discuss.elastic.co/u/aniaks)
#### Post date: [August 19, 2020, 5:51pm UTC](https://discuss.elastic.co/t/elastic-field-include-exclude-performance/245255/3 "2020-08-19T17:51:29Z")

</div>

thanks for explaining !

---

<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: [September 16, 2020, 5:51pm UTC](https://discuss.elastic.co/t/elastic-field-include-exclude-performance/245255/4 "2020-09-16T17:51:31Z")

</div>

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