# Search query performance

**URL:** <https://discuss.elastic.co/t/search-query-performance/119753>\
**Category:** Elasticsearch\
**Created:** [February 14, 2018, 9:06am UTC](https://discuss.elastic.co/t/search-query-performance/119753 "2018-02-14T09:06:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![FedorZaytsev](https://avatars.discourse-cdn.com/v4/letter/f/47e85d/32.png) [@FedorZaytsev](https://discuss.elastic.co/u/FedorZaytsev)\
**Post date:** [February 14, 2018, 9:06am UTC](https://discuss.elastic.co/t/search-query-performance/119753/1 "2018-02-14T09:06:37Z")

</div>

Hi. I have an index of ~10 million users messages. I need to count all unread messages for one particular user (so I need to count all documents where userId = "SOMEID" and is\_read = false). Right now I am using SearchQuery with size = 0 to do it, but I wonder how fast is it? I can have up to 100 such requests per second.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 14, 2018, 9:32am UTC](https://discuss.elastic.co/t/search-query-performance/119753/2 "2018-02-14T09:32:14Z")

</div>

If at some point it becomes too slow you can always increase the number of nodes and the number of replicas to serve more and more searches.

---

<div class="post-metadata">

**Author:** ![FedorZaytsev](https://avatars.discourse-cdn.com/v4/letter/f/47e85d/32.png) [@FedorZaytsev](https://discuss.elastic.co/u/FedorZaytsev)\
**Post date:** [February 14, 2018, 11:55pm UTC](https://discuss.elastic.co/t/search-query-performance/119753/3 "2018-02-14T23:55:41Z")

</div>

Thanks for your reply, David, but I want to get a theoretical number of such simple requests (written in GO):  
queryisRead := elastic.NewTermQuery("is\_read", false)  
queryMsisdn := elastic.NewTermQuery("msisdn", msisdn)  
query := elastic.NewBoolQuery().Must(queryisRead, queryMsisdn)  
data, err := cli.Search(index).Query(query).Size(0).Do()

Is there is any available benchmark which can provide at least approximate information about this number?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 15, 2018, 3:55am UTC](https://discuss.elastic.co/t/search-query-performance/119753/4 "2018-02-15T03:55:43Z")

</div>

There's no way to know without testing for real, on production machines, with your dataset, settings, queries.

---

<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 15, 2018, 3:56am UTC](https://discuss.elastic.co/t/search-query-performance/119753/5 "2018-03-15T03:56:15Z")

</div>

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