# Flat\_object performance vs object

**URL:** <https://forum.opensearch.org/t/flat-object-performance-vs-object/18685>\
**Category:** OpenSearch\
**Created:** [April 3, 2024, 7:53am UTC](https://forum.opensearch.org/t/flat-object-performance-vs-object/18685 "2024-04-03T07:53:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zkorhone](https://avatars.discourse-cdn.com/v4/letter/z/0ea827/32.png) [@zkorhone](https://forum.opensearch.org/u/zkorhone)\
**Post date:** [April 3, 2024, 7:53am UTC](https://forum.opensearch.org/t/flat-object-performance-vs-object/18685/1 "2024-04-03T07:53:14Z")

</div>

**Versions** (relevant - OpenSearch/Dashboard/Server OS/Browser): 2.11 / AWS

**Describe the issue** : When performing large bulk inserts (6 million entries) for relatively simple objects (address data with 5 string fields) flat\_object seems to perform ~50% worse than object. With flat\_object on similar hardware we get 400k inserts / min while with object we get 900k inserts / min. Is this to be expected?

While documentation doesn’t explicitly state that flat\_object would perform better when indexing, it’s easy to make assumption that it would (indexing one item vs indexing multiple items).

**Configuration** :

**Relevant Logs or Screenshots** :

---

<div class="post-metadata">

**Author:** ![reta](https://avatars.discourse-cdn.com/v4/letter/r/cdc98d/32.png) [@reta](https://forum.opensearch.org/u/reta)\
**Post date:** [April 15, 2024, 5:42pm UTC](https://forum.opensearch.org/t/flat-object-performance-vs-object/18685/2 "2024-04-15T17:42:24Z")

</div>

@zkorhone seems to be [[BUG] High CPU usage with flat\_object field type · Issue #12030 · opensearch-project/OpenSearch · GitHub](https://github.com/opensearch-project/OpenSearch/issues/12030) and the fix is supposed to land in 2.12.0
