# Large Array Performance Optimization, Resource Costs

**URL:** <https://discuss.elastic.co/t/large-array-performance-optimization-resource-costs/146279>\
**Category:** Elasticsearch\
**Created:** [August 28, 2018, 7:14am UTC](https://discuss.elastic.co/t/large-array-performance-optimization-resource-costs/146279 "2018-08-28T07:14:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tecfu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tecfu/32/34862_2.png) [@tecfu](https://discuss.elastic.co/u/tecfu)\
**Post date:** [August 28, 2018, 7:14am UTC](https://discuss.elastic.co/t/large-array-performance-optimization-resource-costs/146279/1 "2018-08-28T07:14:41Z")

</div>

I'm interested in discovering how to optimize Elasticsearch. Requirements:

[1] Using an index that contains 100,000 documents.  
[2] Each document contains 2 fields: "id", "my\_array"  
[3] MATCH a KEYWORD against the "myArray" field. "myArray" could have the following number of elements listed in the four scenarios given below, each containing a string no more than 30 chars.  
A. 100  
B. 1000  
C. 10000  
D. 100000

What kind of configuration would allow me to match a single string in the scenarios above in less than 250 milliseconds under a load of 50 concurrent requests?

I think someone asked a simpler version of this question previously, but the Elasticsearch employee who responded did not provide any meaningful information in their response, they just said be "reasonable".

[https://discuss.elastic.co/t/your-post-in-what-are-the-limitations-of-array-size-in-elastic-search/146275](https://discuss.elastic.co/t/your-post-in-what-are-the-limitations-of-array-size-in-elastic-search/146275)

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [August 28, 2018, 2:14pm UTC](https://discuss.elastic.co/t/large-array-performance-optimization-resource-costs/146279/2 "2018-08-28T14:14:04Z")

</div>

> [@tecfu](#):
>
> the Elasticsearch employee who responded did not provide any meaningful information in their response, they just said be "reasonable".

Your link didn't work for me. The response I saw was this: [What are the limitations of array size in elastic search? - #2 by jpountz](https://discuss.elastic.co/t/what-are-the-limitations-of-array-size-in-elastic-search/108413/2)

If so it seemed a perfectly reasonable answer to me. i.e. don't create a single JSON document with an array of a million ID strings which have to be rewritten entirely each time there's any change to that set.

The workaround would be to break this doc up into smaller ones.

---

<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 25, 2018, 2:14pm UTC](https://discuss.elastic.co/t/large-array-performance-optimization-resource-costs/146279/3 "2018-09-25T14:14:05Z")

</div>

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