# Bulk Requests and Routing

**URL:** https://discuss.elastic.co/t/bulk-requests-and-routing/248995
**Category:** Elasticsearch
**Created:** [September 17, 2020, 2:31pm UTC](https://discuss.elastic.co/t/bulk-requests-and-routing/248995 "2020-09-17T14:31:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![munasia](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@munasia](https://discuss.elastic.co/u/munasia)
#### Post date: [September 17, 2020, 2:31pm UTC](https://discuss.elastic.co/t/bulk-requests-and-routing/248995/1 "2020-09-17T14:31:17Z")

</div>

Is there a difference in indexing performance between a bulk request whose individual items have the same routing value vs a bulk request whose items have different values?

Background: I'm fetching rows from a DB to be indexed in Elasticsearch. I want to fetch the documents from the DB, ordered by the routing value, then create the BulkRequests. Since there are many rows I'd like to avoid ordering but don't know if this will affect the BulkRequest indexing performance since the routing values will be random.

---

<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: [September 17, 2020, 10:38pm UTC](https://discuss.elastic.co/t/bulk-requests-and-routing/248995/2 "2020-09-17T22:38:51Z")

</div>

The request will be parsed the same no matter what approach you take.

I can imagine that a bulk that goes to a single shard will take a little longer than one that goes to a few, but whether or not it's massively slower, you'd need to test.

---

<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: [October 15, 2020, 10:38pm UTC](https://discuss.elastic.co/t/bulk-requests-and-routing/248995/3 "2020-10-15T22:38:55Z")

</div>

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