# Heap usage

**URL:** <https://discuss.elastic.co/t/heap-usage/279149>\
**Category:** Elasticsearch\
**Created:** [July 20, 2021, 10:38am UTC](https://discuss.elastic.co/t/heap-usage/279149 "2021-07-20T10:38:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhishek\_Shinde](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@Abhishek\_Shinde](https://discuss.elastic.co/u/Abhishek_Shinde)\
**Post date:** [July 20, 2021, 10:38am UTC](https://discuss.elastic.co/t/heap-usage/279149/1 "2021-07-20T10:38:46Z")

</div>

I'm trying to understand how Elasticsearch uses heap while performing the searches. Does it load entire shard into memory or particular segment for searching the users data?

---

<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:** [July 25, 2021, 11:29pm UTC](https://discuss.elastic.co/t/heap-usage/279149/2 "2021-07-25T23:29:30Z")

</div>

It loads data structures it needs, but not the entire shard.

---

<div class="post-metadata">

**Author:** ![Abhishek\_Shinde](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@Abhishek\_Shinde](https://discuss.elastic.co/u/Abhishek_Shinde)\
**Post date:** [July 26, 2021, 8:42am UTC](https://discuss.elastic.co/t/heap-usage/279149/3 "2021-07-26T08:42:21Z")

</div>

Thanks @warkolm!!!

---

<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 23, 2021, 8:42am UTC](https://discuss.elastic.co/t/heap-usage/279149/4 "2021-08-23T08:42:43Z")

</div>

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