# How much space do keys take?

**URL:** <https://discuss.elastic.co/t/how-much-space-do-keys-take/247297>\
**Category:** Elasticsearch\
**Created:** [September 2, 2020, 10:44pm UTC](https://discuss.elastic.co/t/how-much-space-do-keys-take/247297 "2020-09-02T22:44:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pcb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pcb/32/48423_2.png) [@pcb](https://discuss.elastic.co/u/pcb)\
**Post date:** [September 2, 2020, 10:44pm UTC](https://discuss.elastic.co/t/how-much-space-do-keys-take/247297/1 "2020-09-02T22:44:20Z")

</div>

Hi ya all,

I'm thinking of adding a bunch of boolean flags to my documents and I'm curious about space usage.

Would these two have similar storage?  
`{ "A": false } `  
`{ "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ": false`

Or does key length matter? (i.e. is the string stored on every document or is it aliased with an id?)

Thanks!  
Patrick

---

<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 30, 2020, 10:44pm UTC](https://discuss.elastic.co/t/how-much-space-do-keys-take/247297/2 "2020-09-30T22:44:29Z")

</div>

Closed on September 30, 2020, 10:44pm UTC

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