# Query performance with large number of fields

**URL:** <https://discuss.elastic.co/t/query-performance-with-large-number-of-fields/2989>\
**Category:** Elasticsearch\
**Created:** [June 1, 2010, 6:27pm UTC](https://discuss.elastic.co/t/query-performance-with-large-number-of-fields/2989 "2010-06-01T18:27:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Grant\_Rodgers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/grant_rodgers/32/3204_2.png) [@Grant\_Rodgers](https://discuss.elastic.co/u/Grant_Rodgers)\
**Post date:** [June 1, 2010, 6:27pm UTC](https://discuss.elastic.co/t/query-performance-with-large-number-of-fields/2989/1 "2010-06-01T18:27:05Z")

</div>

Hi, I am designing an index of documents that have a large number of  
fields. The JSON blob being indexed is complex and deeply nested. I  
need to decide whether to cut out the complex part of the document to  
improve query performance. I am not concerned about indexing  
performance, it can be slow (within reason).

Will query performance be affected by a large number of fields in the  
index?

The vast majority of queries will be very simple, querying on a few  
terms, so that is what we want to optimize for.

Grant

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [June 1, 2010, 8:22pm UTC](https://discuss.elastic.co/t/query-performance-with-large-number-of-fields/2989/2 "2010-06-01T20:22:46Z")

</div>

No, the number of fields should not affect query performance to a degree  
that you would notice.

On Tue, Jun 1, 2010 at 9:27 PM, Grant Rodgers [grantr@gmail.com](mailto:grantr@gmail.com) wrote:

> Hi, I am designing an index of documents that have a large number of  
> fields. The JSON blob being indexed is complex and deeply nested. I  
> need to decide whether to cut out the complex part of the document to  
> improve query performance. I am not concerned about indexing  
> performance, it can be slow (within reason).
> 
> Will query performance be affected by a large number of fields in the  
> index?
> 
> The vast majority of queries will be very simple, querying on a few  
> terms, so that is what we want to optimize for.
> 
> Grant

---

<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:** [July 6, 2017, 4:23am UTC](https://discuss.elastic.co/t/query-performance-with-large-number-of-fields/2989/3 "2017-07-06T04:23:39Z")

</div>


