# With multiple shards on the node, the queries for those shards have to be run serially？

**URL:** <https://discuss.elastic.co/t/with-multiple-shards-on-the-node-the-queries-for-those-shards-have-to-be-run-serially/35527>\
**Category:** Elasticsearch\
**Created:** [November 25, 2015, 8:21am UTC](https://discuss.elastic.co/t/with-multiple-shards-on-the-node-the-queries-for-those-shards-have-to-be-run-serially/35527 "2015-11-25T08:21:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![t7s](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@t7s](https://discuss.elastic.co/u/t7s)\
**Post date:** [November 25, 2015, 8:21am UTC](https://discuss.elastic.co/t/with-multiple-shards-on-the-node-the-queries-for-those-shards-have-to-be-run-serially/35527/1 "2015-11-25T08:21:24Z")

</div>

> Having multiple shards on a single node introduces another set of  
> performance considerations. As discussed earlier, in order to run a  
> complete query, Elasticsearch must run the query on each shard  
> individually. In a one-shard-per-node setup, all those queries can run  
> in parallel, because there's only one shard on each node. With multiple  
> shards on the node, the queries for those shards have to be run  
> serially.

Is it right？

---

<div class="post-metadata">

**Author:** ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)\
**Post date:** [November 25, 2015, 9:25am UTC](https://discuss.elastic.co/t/with-multiple-shards-on-the-node-the-queries-for-those-shards-have-to-be-run-serially/35527/2 "2015-11-25T09:25:41Z")

</div>

Hi,

I don't think so, there are multiple search threads running even on a single node, so if you have multiple cores on your machine they should be all used in parallel for searching the shards.

---

<div class="post-metadata">

**Author:** ![t7s](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@t7s](https://discuss.elastic.co/u/t7s)\
**Post date:** [November 25, 2015, 9:50am UTC](https://discuss.elastic.co/t/with-multiple-shards-on-the-node-the-queries-for-those-shards-have-to-be-run-serially/35527/3 "2015-11-25T09:50:48Z")

</div>

I am not sure. In offical website, there are only some documents about don't use too many shard, so expecting an definite answer

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 25, 2015, 9:54am UTC](https://discuss.elastic.co/t/with-multiple-shards-on-the-node-the-queries-for-those-shards-have-to-be-run-serially/35527/4 "2015-11-25T09:54:06Z")

</div>

No. That is not correct.

Lucene is multithreaded for starters, so even if you had a single shard, as long as you have multiple threads you get a benefit.

---

<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/with-multiple-shards-on-the-node-the-queries-for-those-shards-have-to-be-run-serially/35527/5 "2017-07-05T23:35:57Z")

</div>


