# Shards query and merging time

**URL:** <https://discuss.elastic.co/t/shards-query-and-merging-time/89528>\
**Category:** Elasticsearch\
**Created:** [June 15, 2017, 8:21am UTC](https://discuss.elastic.co/t/shards-query-and-merging-time/89528 "2017-06-15T08:21:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yashpal\_Singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yashpal_singh/32/43209_2.png) [@Yashpal\_Singh](https://discuss.elastic.co/u/Yashpal_Singh)\
**Post date:** [June 15, 2017, 8:21am UTC](https://discuss.elastic.co/t/shards-query-and-merging-time/89528/1 "2017-06-15T08:21:54Z")

</div>

Hi,

I want to know if there is anyway, by which we can find the following  
1)Query execution time on a shard.  
2)Merging time to merge the result of every shard.

I have gone through the Profile API, But didn't understand much, Could you please help me with above timings.

---

<div class="post-metadata">

**Author:** ![SKumarMN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skumarmn/32/27537_2.png) [@SKumarMN](https://discuss.elastic.co/u/SKumarMN)\
**Post date:** [June 15, 2017, 5:03pm UTC](https://discuss.elastic.co/t/shards-query-and-merging-time/89528/2 "2017-06-15T17:03:12Z")

</div>

IF you have a setting index.search.slowlog.threshold.query.debug: 0s in your elasticsearch .yml, it would print the query execution time per shard.

Related to second question please check this [https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html)

---

<div class="post-metadata">

**Author:** ![Yashpal\_Singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yashpal_singh/32/43209_2.png) [@Yashpal\_Singh](https://discuss.elastic.co/u/Yashpal_Singh)\
**Post date:** [June 16, 2017, 5:27am UTC](https://discuss.elastic.co/t/shards-query-and-merging-time/89528/3 "2017-06-16T05:27:59Z")

</div>

> [@SKumarMN](#):
>
> index.search.slowlog.threshold.query.debug: 0s

Hey SKumarMN,

Thanks .

Will surely try this today.

As for the merging time taken by each shard for a given search query, We wont be able to find using : [Index stats API | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html)

As these gives the cummulative time.

---

<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 14, 2017, 5:28am UTC](https://discuss.elastic.co/t/shards-query-and-merging-time/89528/4 "2017-07-14T05:28:51Z")

</div>

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