# Profiling : "took" is much higher than all breakdown times

**URL:** <https://discuss.elastic.co/t/profiling-took-is-much-higher-than-all-breakdown-times/122951>\
**Category:** Elasticsearch\
**Created:** [March 7, 2018, 7:36pm UTC](https://discuss.elastic.co/t/profiling-took-is-much-higher-than-all-breakdown-times/122951 "2018-03-07T19:36:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Retenodus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/retenodus/32/28063_2.png) [@Retenodus](https://discuss.elastic.co/u/Retenodus)\
**Post date:** [March 7, 2018, 7:36pm UTC](https://discuss.elastic.co/t/profiling-took-is-much-higher-than-all-breakdown-times/122951/1 "2018-03-07T19:36:46Z")

</div>

Hello,

I have some kibana queries which take a very long time (it timeouts) and I struggle to see why, with Elasticsearch/Kibana 6.1.

- My indice is 50Go in 10 hosts
- For testing, I try a query on a very narrow timeframe (2s)
- The query returns 16 results, then I use a GlobalOrdinalsStringTermsAggregator
- The field aggregated are really ip addresses (all valid, I checked them) but the type is "string" in Elasticsearch

So in order to troubleshoot that, I tried to use the profiling API (see the result [here](https://bpaste.net/show/66e832e1d002))

Which surprises me is the big difference between "took" and the time breakdowns. What could be concerned by "took" except what's in the profiling ?

I read [here](https://discuss.elastic.co/t/profile-api-time-does-not-match-top-level-took/42659) that it could me network/http related but that does not explain why it's specifically on this aggregation.

Does someone know what could be the issue ?

Thank you,  
Regards,  
Grégoire

---

<div class="post-metadata">

**Author:** ![Retenodus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/retenodus/32/28063_2.png) [@Retenodus](https://discuss.elastic.co/u/Retenodus)\
**Post date:** [March 12, 2018, 11:27am UTC](https://discuss.elastic.co/t/profiling-took-is-much-higher-than-all-breakdown-times/122951/2 "2018-03-12T11:27:05Z")

</div>

Hello,

Does someone have any idea why this query would take such a long time on a small sample of data ? The query is given [here](https://bpaste.net/show/cfa6c9fb9461). Which other parameters would have an influence in these response times ?

Regards,  
Grégoire

---

<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:** [April 9, 2018, 11:27am UTC](https://discuss.elastic.co/t/profiling-took-is-much-higher-than-all-breakdown-times/122951/3 "2018-04-09T11:27:14Z")

</div>

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