# Shard Query Cache: Expensive if only a few queries 'hit'?

**URL:** https://discuss.elastic.co/t/shard-query-cache-expensive-if-only-a-few-queries-hit/35550
**Category:** Elasticsearch
**Created:** [November 25, 2015, 12:44pm UTC](https://discuss.elastic.co/t/shard-query-cache-expensive-if-only-a-few-queries-hit/35550 "2015-11-25T12:44:03Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![lwintergerst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lwintergerst/32/18164_2.png) [@lwintergerst](https://discuss.elastic.co/u/lwintergerst)
#### Post date: [November 25, 2015, 12:44pm UTC](https://discuss.elastic.co/t/shard-query-cache-expensive-if-only-a-few-queries-hit/35550/1 "2015-11-25T12:44:03Z")

</div>

Hello,

i have been experimenting with the shard query cache lately and have seen great results in a few cases.  
Kibana board load times went from 70s to 10s, if the time range is selected correctly.

But since you have to use static time ranges, e.g. 'this week' 'today' and so on, it may not be used that often.

My question is if the overhead will be expensive if I just enable it by default on all indices.

Will the expense only be the % of HEAP I sacrifice to it?  
Does it need much extra CPU?  
Will queries which 'miss' the cache take longer than before?

Thanks,  
Luca

---

<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:35pm UTC](https://discuss.elastic.co/t/shard-query-cache-expensive-if-only-a-few-queries-hit/35550/2 "2017-07-05T23:35:55Z")

</div>


