# How does the search performance compare between standard and nested document structure

**URL:** <https://discuss.elastic.co/t/how-does-the-search-performance-compare-between-standard-and-nested-document-structure/351070>\
**Category:** Elasticsearch\
**Created:** [January 15, 2024, 1:20pm UTC](https://discuss.elastic.co/t/how-does-the-search-performance-compare-between-standard-and-nested-document-structure/351070 "2024-01-15T13:20:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmaccou](https://avatars.discourse-cdn.com/v4/letter/m/cab0a1/32.png) [@mmaccou](https://discuss.elastic.co/u/mmaccou)\
**Post date:** [January 15, 2024, 1:20pm UTC](https://discuss.elastic.co/t/how-does-the-search-performance-compare-between-standard-and-nested-document-structure/351070/1 "2024-01-15T13:20:31Z")

</div>

I’m exploring different ways to structure my indices. I found an article on the Elasticsearch blog about using nested documents. All else being equal, does this structure impact the speed or other performance/accuracy indicators compared to a more standard structure?

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [January 17, 2024, 10:36am UTC](https://discuss.elastic.co/t/how-does-the-search-performance-compare-between-standard-and-nested-document-structure/351070/2 "2024-01-17T10:36:12Z")

</div>

Hi @mmaccou,

There are some limits in place for use of nested types. There is more details [here in the documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/nested.html#_limits_on_nested_mappings_and_objects). There is a potential for performance issues and mapping explosion if the nested type is not used carefully.

I'm not sure which blog you're referencing, but [this one](https://opster.com/guides/elasticsearch/data-architecture/elasticsearch-nested-field-object-field/) does have some discussion around object versus nested types. If you are wanting to compare the performance based on your own data structures the [Search Profiler](https://www.elastic.co/guide/en/kibana/current/xpack-profiler.html) could be useful for evaluating your queries.

Hope that helps!

---

<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:** [February 14, 2024, 10:37am UTC](https://discuss.elastic.co/t/how-does-the-search-performance-compare-between-standard-and-nested-document-structure/351070/3 "2024-02-14T10:37:02Z")

</div>

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