# Best practice of storing structs. Should I pack or store fields separately

**URL:** <https://forums.foundationdb.org/t/best-practice-of-storing-structs-should-i-pack-or-store-fields-separately/425>\
**Category:** Using FoundationDB\
**Created:** [May 16, 2018, 11:07pm UTC](https://forums.foundationdb.org/t/best-practice-of-storing-structs-should-i-pack-or-store-fields-separately/425 "2018-05-16T23:07:22Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![wwilson](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/wwilson/32/88_2.png) [@wwilson](https://forums.foundationdb.org/u/wwilson)\
**Post date:** [May 17, 2018, 1:16pm UTC](https://forums.foundationdb.org/t/best-practice-of-storing-structs-should-i-pack-or-store-fields-separately/425/6 "2018-05-17T13:16:48Z")

</div>

The point Christophe made about lack of prefix compression in keys is especially important. I think this is a common enough layer concern that it should probably become an optional storage engine feature someday (as discussed here: [Discussion thread for new storage engine ideas](https://forums.foundationdb.org/t/discussion-thread-for-new-storage-engine-ideas/101/6)).

---

_[View the full topic](https://forums.foundationdb.org/t/best-practice-of-storing-structs-should-i-pack-or-store-fields-separately/425)._
