# One index with many empty fields VS Two indexes with lesser empty fields?

**URL:** <https://discuss.elastic.co/t/one-index-with-many-empty-fields-vs-two-indexes-with-lesser-empty-fields/15614>\
**Category:** Elasticsearch\
**Created:** [February 5, 2014, 10:55am UTC](https://discuss.elastic.co/t/one-index-with-many-empty-fields-vs-two-indexes-with-lesser-empty-fields/15614 "2014-02-05T10:55:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ivan\_Ji](https://avatars.discourse-cdn.com/v4/letter/i/d78d45/32.png) [@Ivan\_Ji](https://discuss.elastic.co/u/Ivan_Ji)\
**Post date:** [February 5, 2014, 10:55am UTC](https://discuss.elastic.co/t/one-index-with-many-empty-fields-vs-two-indexes-with-lesser-empty-fields/15614/1 "2014-02-05T10:55:43Z")

</div>

Hi all,

Assume I have two sets of data to be stored. The data field of these two  
sets are completely different.

I am wondering what's the better option between using one index to store  
the two set of data and using two index to store these two data?

If I use only one index, it will result in many fields exist in the mapping  
but not really exist in the document. So when to query, does it make  
performance worse? Or what's the difference?

Ideas?

Thanks a lot.

Ivan

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/f94dc73f-4aba-4ad3-8a1a-80bb257438f6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f94dc73f-4aba-4ad3-8a1a-80bb257438f6%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [February 5, 2014, 3:50pm UTC](https://discuss.elastic.co/t/one-index-with-many-empty-fields-vs-two-indexes-with-lesser-empty-fields/15614/2 "2014-02-05T15:50:19Z")

</div>

Hi Ivan,

If your data sets don't have common fields, I would recommend to use  
several indices. This will be more make both query execution and postings  
list compression more efficient.

On Wed, Feb 5, 2014 at 11:55 AM, Ivan Ji [hxuanji@gmail.com](mailto:hxuanji@gmail.com) wrote:

> Hi all,
> 
> Assume I have two sets of data to be stored. The data field of these two  
> sets are completely different.
> 
> I am wondering what's the better option between using one index to store  
> the two set of data and using two index to store these two data?
> 
> If I use only one index, it will result in many fields exist in the  
> mapping but not really exist in the document. So when to query, does it  
> make performance worse? Or what's the difference?
> 
> Ideas?
> 
> Thanks a lot.
> 
> Ivan
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/f94dc73f-4aba-4ad3-8a1a-80bb257438f6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f94dc73f-4aba-4ad3-8a1a-80bb257438f6%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
Adrien Grand

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j7rkmxtq9xWRipMA2cO7\_YeZ2q%3DbK6A3S1%2B9J-nnu7dig%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j7rkmxtq9xWRipMA2cO7_YeZ2q%3DbK6A3S1%2B9J-nnu7dig%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 1:52am UTC](https://discuss.elastic.co/t/one-index-with-many-empty-fields-vs-two-indexes-with-lesser-empty-fields/15614/3 "2017-07-06T01:52:23Z")

</div>


