# Question about map variables

**URL:** <https://forums.unrealengine.com/t/question-about-map-variables/2046693>\
**Category:** Blueprint\
**Tags:** Variable, maps, unreal-engine, question\
**Created:** [September 30, 2024, 10:01pm UTC](https://forums.unrealengine.com/t/question-about-map-variables/2046693 "2024-09-30T22:01:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![davi1521](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@davi1521](https://forums.unrealengine.com/u/davi1521)\
**Post date:** [September 30, 2024, 10:01pm UTC](https://forums.unrealengine.com/t/question-about-map-variables/2046693/1 "2024-09-30T22:01:43Z")

</div>

Does anyone know how many key-value pairs a map variable can hold? Is there a limit?

And, when the map is being called on for a function, are all of the keys and values in memory at that point in time? Only the keys?

If I have a data table that contains a row that is just a struct that contains a map, will all the maps always be in memory?

Thank you very much!

---

<div class="post-metadata">

**Author:** ![doctorpepperdan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@doctorpepperdan](https://forums.unrealengine.com/u/doctorpepperdan)\
**Post date:** [October 1, 2024, 12:01am UTC](https://forums.unrealengine.com/t/question-about-map-variables/2046693/2 "2024-10-01T00:01:25Z")

</div>

2^64-1 key value Wich I think is around 50k. And I believe only the value you have called will be in memory I’m not 100% on that though, when calling a data table row I believe the entire row will be in memory

---

<div class="post-metadata">

**Author:** ![davi1521](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@davi1521](https://forums.unrealengine.com/u/davi1521)\
**Post date:** [October 1, 2024, 12:52pm UTC](https://forums.unrealengine.com/t/question-about-map-variables/2046693/3 "2024-10-01T12:52:49Z")

</div>

Awesome. Thanks for your help!

And for data tables, it’s just the row that’s in memory, not the whole table? I think that’s what somebody told me at one point

---

<div class="post-metadata">

**Author:** ![pezzott1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pezzott1/32/1215068_2.png) [@pezzott1](https://forums.unrealengine.com/u/pezzott1)\
**Post date:** [October 1, 2024, 1:08pm UTC](https://forums.unrealengine.com/t/question-about-map-variables/2046693/4 "2024-10-01T13:08:45Z")

</div>

Hi,

If i’m not mistaken its the entire table in memory. Same for variables.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 1, 2024, 1:37pm UTC](https://forums.unrealengine.com/t/question-about-map-variables/2046693/5 "2024-10-01T13:37:57Z")

</div>

> [@doctorpepperdan](#):
>
> 2^64-1 key value Wich I think is around 50k

🤔 close enough I guess. Looks like a quintillion to me.

> [@davi1521](#):
>
> it’s just the row that’s in memory, not the whole table? I think that’s what somebody told me at one point

If you question it, you’re definitely ready for:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/4/9/d49234d46d4d630444310ef23c8beadd64f756a3.jpeg "Demystifying Soft Object References | Inside Unreal") ](https://www.youtube.com/watch?v=K0ENnLV19Cw&t=1s)

---

<div class="post-metadata">

**Author:** ![doctorpepperdan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@doctorpepperdan](https://forums.unrealengine.com/u/doctorpepperdan)\
**Post date:** [October 2, 2024, 10:00am UTC](https://forums.unrealengine.com/t/question-about-map-variables/2046693/6 "2024-10-02T10:00:46Z")

</div>

Great video definitely gonna be reviewing this and applying some knowledge to my project 💪
