# What else can I do to improve performance?

**URL:** <https://discuss.elastic.co/t/what-else-can-i-do-to-improve-performance/57248>\
**Category:** Elasticsearch\
**Created:** [August 4, 2016, 4:04pm UTC](https://discuss.elastic.co/t/what-else-can-i-do-to-improve-performance/57248 "2016-08-04T16:04:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bguyzer](https://avatars.discourse-cdn.com/v4/letter/b/50afbb/32.png) [@bguyzer](https://discuss.elastic.co/u/bguyzer)\
**Post date:** [August 4, 2016, 4:04pm UTC](https://discuss.elastic.co/t/what-else-can-i-do-to-improve-performance/57248/1 "2016-08-04T16:04:59Z")

</div>

Taking hardware out of the equation and strictly looking at the tools available via Elasticsearch api, I'm looking for any other advice or suggestions on how I can improve performance. I have an index of roughly 220 million documents that responds fairly quickly, and trying to confirm there is nothing else I can do within the bounds of ES to improve on that speed.

I have an index mapped as follows:  
`... "_routing" : { "required" : true, "path" : "categoryId" }, "properties" : { "personId" : { "type" : "integer", "doc_values": true, "include_in_all" : false }, "statusId" : { "type" : "byte", "doc_values" : true, "include_in_all" : false }, "city" : { "type" : "string", "index" : "not_analyzed" }, "state" : { "type" : "string", "index" : "not_analyzed" }, "categoryId" : { "type" : "integer", "doc_values" : "true", "include_in_all": false }, ...`

The goal here is to perform a search for "personId" and other associated information based on the combination of particular status codes, city, state, and categoryId.  
(categoryId is distributed such that using custom routing did make a quantifiable positive impact to performance).

My query looks like this:  
`{ "query": { "filtered": { "query": {"match_all": {}}, "filter": { "bool": { "must": [{ "terms": { "statusId": [ 2, 3] } }, { "term": { "city": "Atlanta" } }, { "term": { "state": "GA", "_cache" : true } }, { "term": { "categoryId": 12345, "_cache" : true } } ] } } } }, "sort" : [{ "statusId" : { "order" : "asc" } }] }`

Is there anything glaringly wrong with my approach?

---

<div class="post-metadata">

**Author:** ![DiscussBuster](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/discussbuster/32/11042_2.png) [@DiscussBuster](https://discuss.elastic.co/u/DiscussBuster)\
**Post date:** [August 10, 2016, 4:10am UTC](https://discuss.elastic.co/t/what-else-can-i-do-to-improve-performance/57248/2 "2016-08-10T04:10:32Z")

</div>

Looks good to me.

---

<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, 10:28pm UTC](https://discuss.elastic.co/t/what-else-can-i-do-to-improve-performance/57248/3 "2017-07-05T22:28:57Z")

</div>

Closed on July 5, 2017, 10:28pm UTC


