# Keyword term aggregations much slower after 5.6 -\> 6.2 upgrade

**URL:** <https://discuss.elastic.co/t/keyword-term-aggregations-much-slower-after-5-6-6-2-upgrade/129180>\
**Category:** Elasticsearch\
**Created:** [April 23, 2018, 8:46pm UTC](https://discuss.elastic.co/t/keyword-term-aggregations-much-slower-after-5-6-6-2-upgrade/129180 "2018-04-23T20:46:22Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![Emily1](https://avatars.discourse-cdn.com/v4/letter/e/76d3ee/32.png) [@Emily1](https://discuss.elastic.co/u/Emily1)\
**Post date:** [May 17, 2018, 1:49pm UTC](https://discuss.elastic.co/t/keyword-term-aggregations-much-slower-after-5-6-6-2-upgrade/129180/12 "2018-05-17T13:49:50Z")

</div>

Thanks for the article, I'll look through that today and see how I can integrate that with the kibana dashboard JSON.

Just to be clear for anyone else who reads this, setting "size" to something much bigger than the number of terms does not appear to cause a performance decrease. In particular, in my example, setting size to 20000 results in a query that takes 22.6 seconds for 15 minutes, and setting size to 1000000 results in a query that takes 21.6 seconds for another 15 minute period. The query response sizes were the same, which is to say that a size of 20000 was large enough to capture my full data set. Notes on methodology: The 15 minute periods were non-overlapping so that caching did not affect the results, but the document counts were within .2% of each other, so they were of comparable size.

The main problem appears to be that the 6.2 update to Kibana replaced the old, fast implementation of the table with a new, inefficient one and it is not a priority to fix that, I guess: see my question here.

> [@Keyword Aggregation Table extremely slow compared with equivalent query after 5.6-\>6.2 upgrade](https://discuss.elastic.co/t/keyword-aggregation-table-extremely-slow-compared-with-equivalent-query-after-5-6-6-2-upgrade/132223):
>
> Hi, I recently upgraded from Kibana 5.6.2 to Kibana 6.2 and have found that a table that previously loaded in about 30 seconds for 15 minutes of data dramatically slowed and now loads in almost 3 minutes for the same time range. However, if I copy the request that Kibana is making to draw this table and run the request in Kibana Devtools or cURL, the request loads in 25 seconds. In other words, Kibana takes an additional 2.5 minutes longer to visualize the data that ES can aggregate in 25 seco…

I appreciate all the help in troubleshooting.

---

_[View the full topic](https://discuss.elastic.co/t/keyword-term-aggregations-much-slower-after-5-6-6-2-upgrade/129180)._
