# Kibana and index patterns performance

**URL:** <https://discuss.elastic.co/t/kibana-and-index-patterns-performance/209564>\
**Category:** Kibana\
**Created:** [November 26, 2019, 6:46pm UTC](https://discuss.elastic.co/t/kibana-and-index-patterns-performance/209564 "2019-11-26T18:46:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mtudisco](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@mtudisco](https://discuss.elastic.co/u/mtudisco)\
**Post date:** [November 26, 2019, 6:46pm UTC](https://discuss.elastic.co/t/kibana-and-index-patterns-performance/209564/1 "2019-11-26T18:46:32Z")

</div>

Hi all,

I'm collecting information with filebeat, procesing it with logstash and storing in elasticsearch. I have different types and sub-types of information, and indexing the information with something similar to  
%{[type]}-%{sub\_type}-%{+YYYY.MM.dd}

For the same "type" i have several "sub\_type".

Then we have one dashboard with several charts and tables getting data from those indexes.

The question is regarding performance, what is the best option:

1. having one index pattern type\* and then in the charts adding filters for sub\_type.keyword:XX for the different sub\_type

or

1. having one index pattern for each sub\_type: type-sub\_type\* and in this case not using the filter

thanks

---

<div class="post-metadata">

**Author:** ![matw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matw/32/13913_2.png) [@matw](https://discuss.elastic.co/u/matw)\
**Post date:** [November 28, 2019, 8:53am UTC](https://discuss.elastic.co/t/kibana-and-index-patterns-performance/209564/2 "2019-11-28T08:53:24Z")

</div>

Hi

Assuming you have a large amount of data to query, the second pattern should be more performant, because there will be less indices queried.

pattern 1:  
your-type1-_.  
pattern 2:  
your-type1-subtype1_.  
your-type1-subtype2\*  
...  
With pattern2 you will basically pre-filter you data. You won't notice much difference at a small amount of data, but at large scale this should have a better performance

---

<div class="post-metadata">

**Author:** ![mtudisco](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@mtudisco](https://discuss.elastic.co/u/mtudisco)\
**Post date:** [November 28, 2019, 12:16pm UTC](https://discuss.elastic.co/t/kibana-and-index-patterns-performance/209564/3 "2019-11-28T12:16:48Z")

</div>

Thanks Matthias, and in case of second patter with indexes like:

> %{[type]}-%{sub\_type}-%{+YYYY.MM.dd}

When you filter by dates in dashboards, does it go all over all indexes or kibana knows the index format and go over the related indexes?

thanks

---

<div class="post-metadata">

**Author:** ![matw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matw/32/13913_2.png) [@matw](https://discuss.elastic.co/u/matw)\
**Post date:** [November 28, 2019, 12:27pm UTC](https://discuss.elastic.co/t/kibana-and-index-patterns-performance/209564/4 "2019-11-28T12:27:45Z")

</div>

In this case there is no further optimization by the index name, like eg you define a range of a month, you want kibana just to use

your-type1-subtype2-2019-12-\*

that's currently not possible

---

<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:** [December 26, 2019, 12:27pm UTC](https://discuss.elastic.co/t/kibana-and-index-patterns-performance/209564/5 "2019-12-26T12:27:54Z")

</div>

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