# Performance of percentile aggregations

**URL:** <https://discuss.elastic.co/t/performance-of-percentile-aggregations/31742>\
**Category:** Elasticsearch\
**Created:** [October 7, 2015, 12:59am UTC](https://discuss.elastic.co/t/performance-of-percentile-aggregations/31742 "2015-10-07T00:59:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Srinath\_C](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/srinath_c/32/48806_2.png) [@Srinath\_C](https://discuss.elastic.co/u/Srinath_C)\
**Post date:** [October 7, 2015, 12:59am UTC](https://discuss.elastic.co/t/performance-of-percentile-aggregations/31742/1 "2015-10-07T00:59:58Z")

</div>

In our cluster, we have observed that the use of percentile aggregations increases the execution time of our query by multiple times (almost like 10 times! depending upon the number of documents).

I know that percentile aggregation is in experimental phase but is this a known issue or am I doing something wrong?

The percentile aggregation is expressed as:

```
"handshakeTime":{
         "percentiles":{
            "field":"handshakeTime",
            "percents":[85]
         }
      }

```

Setup:  
ES version : 1.7.2  
Cluster : 3 c3.large master nodes and 6 m3.xlarge data nodes  
Index: 3 shards, 1 replica, 24h ttl on documents  
Load: 5000 docs/sec for about 24 hrs  
Query: Lot of aggregations including terms, histograms and filtered aggregations

---

<div class="post-metadata">

**Author:** ![colings86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colings86/32/44960_2.png) [@colings86](https://discuss.elastic.co/u/colings86)\
**Post date:** [October 7, 2015, 1:00pm UTC](https://discuss.elastic.co/t/performance-of-percentile-aggregations/31742/2 "2015-10-07T13:00:17Z")

</div>

Can you share your full query in a linked [gist](http://gist.github.com)?

---

<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 5, 2017, 11:46pm UTC](https://discuss.elastic.co/t/performance-of-percentile-aggregations/31742/3 "2017-07-05T23:46:10Z")

</div>


