# Query exection

**URL:** <https://discuss.elastic.co/t/query-exection/10980>\
**Category:** Elasticsearch\
**Created:** [March 3, 2013, 7:52am UTC](https://discuss.elastic.co/t/query-exection/10980 "2013-03-03T07:52:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexis\_Okuwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexis_okuwa/32/1983_2.png) [@Alexis\_Okuwa](https://discuss.elastic.co/u/Alexis_Okuwa)\
**Post date:** [March 3, 2013, 7:52am UTC](https://discuss.elastic.co/t/query-exection/10980/1 "2013-03-03T07:52:27Z")

</div>

I remember once seeing something that related to es query exeuction not  
sure if its for get and also a search but for every shard in the index it  
has to query each of them until it finds the shard that has the dataset and  
it does not do all the shards at once but one at a time.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![simonw\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simonw_2/32/1130_2.png) [@simonw\_2](https://discuss.elastic.co/u/simonw_2)\
**Post date:** [March 3, 2013, 8:10am UTC](https://discuss.elastic.co/t/query-exection/10980/2 "2013-03-03T08:10:33Z")

</div>

I think you confuse something. for a `get` action ES only ask one shard  
since it knows where to go. For a `search` it queries all shards (one  
replica of each shard) and merges the results but that happens in parallel.

simon  
On Sunday, March 3, 2013 8:52:27 AM UTC+1, Wojons Tech wrote:

> I remember once seeing something that related to es query exeuction not  
> sure if its for get and also a search but for every shard in the index it  
> has to query each of them until it finds the shard that has the dataset and  
> it does not do all the shards at once but one at a time.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Alexis\_Okuwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexis_okuwa/32/1983_2.png) [@Alexis\_Okuwa](https://discuss.elastic.co/u/Alexis_Okuwa)\
**Post date:** [March 3, 2013, 8:18am UTC](https://discuss.elastic.co/t/query-exection/10980/3 "2013-03-03T08:18:37Z")

</div>

Okay that is what i wanted to make sure it was doing after posting the  
first time i figured the get was smart, The reason for the search one was I  
thought I heard something related in one of the converances that  
elasticsearch would query the databases not in parral

On Saturday, March 2, 2013 11:52:27 PM UTC-8, Wojons Tech wrote:

> I remember once seeing something that related to es query exeuction not  
> sure if its for get and also a search but for every shard in the index it  
> has to query each of them until it finds the shard that has the dataset and  
> it does not do all the shards at once but one at a time.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:48am UTC](https://discuss.elastic.co/t/query-exection/10980/4 "2017-07-06T02:48:44Z")

</div>


