# How to improve query performance?

**URL:** <https://discuss.elastic.co/t/how-to-improve-query-performance/7939>\
**Category:** Elasticsearch\
**Created:** [June 1, 2012, 8:01am UTC](https://discuss.elastic.co/t/how-to-improve-query-performance/7939 "2012-06-01T08:01:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dong\_Aihua](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dong_aihua/32/2413_2.png) [@Dong\_Aihua](https://discuss.elastic.co/u/Dong_Aihua)\
**Post date:** [June 1, 2012, 8:01am UTC](https://discuss.elastic.co/t/how-to-improve-query-performance/7939/1 "2012-06-01T08:01:33Z")

</div>

Hi,  
Currently, I use 2 servers(2 shards+1 replica) to query 0.46 billion  
documents. The average query response time is 1.5s.  
I wish I can simply add a new server into the cluster to improve the  
query performance. (still 2 shards + 1 replica)  
But after adding a new server into the cluster, I found the query  
performance didn't improve much. The average query response time still is  
1.5s.  
Did I miss anything??  
In addition, I'm wondering is there any difference of querying only one  
server or query 3 servers roundly?

-Regards-  
-Jackie-

---

<div class="post-metadata">

**Author:** ![AEvar\_Arnfjord\_Bjarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aevar_arnfjord_bjarm/32/2746_2.png) [@AEvar\_Arnfjord\_Bjarm](https://discuss.elastic.co/u/AEvar_Arnfjord_Bjarm)\
**Post date:** [June 1, 2012, 10:55am UTC](https://discuss.elastic.co/t/how-to-improve-query-performance/7939/2 "2012-06-01T10:55:32Z")

</div>

This really doesn't tell us much of anything

- What's your HW setup like, is this data in RAM, on disk, what does  
the CPU/disk use etc. look like when you do queries
- What does your data look like, do you have an example
- How does the mapping look like
- How do the queries that you've tried look like
- Have you tried increasing the number of shards, if you have 2 shards  
in total with X number of replicas and 3 machines you'll only  
distribute your queries to 2 shards, maybe that's your bottleneck, so  
increasing replicas/boxes wouldn't help.

---

<div class="post-metadata">

**Author:** ![otisg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otisg/32/492_2.png) [@otisg](https://discuss.elastic.co/u/otisg)\
**Post date:** [June 2, 2012, 11:27pm UTC](https://discuss.elastic.co/t/how-to-improve-query-performance/7939/3 "2012-06-02T23:27:17Z")

</div>

Jackie,

It doesn't help to add a new server if no shards/replicas are migrated to  
it. Check manually via the API or look at SPM.  
Also, by adding more servers you are adding more CPUs, so resharding may  
make sense.

## Otis

Search Analytics - [Cloud Monitoring Tools & Services | Sematext](http://sematext.com/search-analytics/index.html)  
Scalable Performance Monitoring - [Sematext Monitoring | Infrastructure Monitoring Service](http://sematext.com/spm/index.html)

On Friday, June 1, 2012 4:01:33 AM UTC-4, jackiedong wrote:

> Hi,  
> Currently, I use 2 servers(2 shards+1 replica) to query 0.46 billion  
> documents. The average query response time is 1.5s.  
> I wish I can simply add a new server into the cluster to improve the  
> query performance. (still 2 shards + 1 replica)  
> But after adding a new server into the cluster, I found the query  
> performance didn't improve much. The average query response time still is  
> 1.5s.  
> Did I miss anything??  
> In addition, I'm wondering is there any difference of querying only one  
> server or query 3 servers roundly?
> 
> -Regards-  
> -Jackie-

---

<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 6, 2017, 3:25am UTC](https://discuss.elastic.co/t/how-to-improve-query-performance/7939/4 "2017-07-06T03:25:54Z")

</div>


