# How do you improve profile of a match\_all query that takes 20s?

**URL:** https://discuss.elastic.co/t/how-do-you-improve-profile-of-a-match-all-query-that-takes-20s/77054
**Category:** Elasticsearch
**Created:** [March 1, 2017, 9:30pm UTC](https://discuss.elastic.co/t/how-do-you-improve-profile-of-a-match-all-query-that-takes-20s/77054 "2017-03-01T21:30:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![TealFawn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tealfawn/32/44845_2.png) [@TealFawn](https://discuss.elastic.co/u/TealFawn)
#### Post date: [March 1, 2017, 9:30pm UTC](https://discuss.elastic.co/t/how-do-you-improve-profile-of-a-match-all-query-that-takes-20s/77054/1 "2017-03-01T21:30:02Z")

</div>

Doing the basic match all query on one index takes a cumulative time of 20s or 11s from one shard. Where should I look to improve search performance on the most basic of searches I can do.

Query:  
{  
"query":{  
"match\_all" : {}  
}  
}

 ![](https://us1.discourse-cdn.com/elastic/original/2X/d/d695f227a68d2744122d6c08cd0b587ba7128f37.png)

---

<div class="post-metadata">

### Author: ![xavierfacq](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xavierfacq/32/8744_2.png) [@xavierfacq](https://discuss.elastic.co/u/xavierfacq)
#### Post date: [March 2, 2017, 8:50am UTC](https://discuss.elastic.co/t/how-do-you-improve-profile-of-a-match-all-query-that-takes-20s/77054/2 "2017-03-02T08:50:52Z")

</div>

Hi, You should provide more informations about your cluster, indices, shards and configurations.

---

<div class="post-metadata">

### Author: ![TealFawn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tealfawn/32/44845_2.png) [@TealFawn](https://discuss.elastic.co/u/TealFawn)
#### Post date: [March 2, 2017, 8:59pm UTC](https://discuss.elastic.co/t/how-do-you-improve-profile-of-a-match-all-query-that-takes-20s/77054/3 "2017-03-02T20:59:25Z")

</div>

Not sure what exactly to provide cluster\_state.json is an ~8mb file.

Here's the overview though

 ![](https://us1.discourse-cdn.com/elastic/original/3X/0/1/01be11548c832441e613f88a5c270339381b8195.png)

It's also worth noting with the majority of the indices have 5 shards with 1 replica.

---

<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: [March 30, 2017, 8:59pm UTC](https://discuss.elastic.co/t/how-do-you-improve-profile-of-a-match-all-query-that-takes-20s/77054/4 "2017-03-30T20:59:39Z")

</div>

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