# Mutate rename multiple fields, how to improve performance?

**URL:** https://discuss.elastic.co/t/mutate-rename-multiple-fields-how-to-improve-performance/252606
**Category:** Logstash
**Created:** [October 19, 2020, 8:31pm UTC](https://discuss.elastic.co/t/mutate-rename-multiple-fields-how-to-improve-performance/252606 "2020-10-19T20:31:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [October 19, 2020, 8:31pm UTC](https://discuss.elastic.co/t/mutate-rename-multiple-fields-how-to-improve-performance/252606/1 "2020-10-19T20:31:23Z")

</div>

Hello,

I have a pipeline where I need to rename something around 1100 fields, the documents do not have all the fields, but in total I need to rename near 1100 fields.

Currently I have one `mutate` filter with a `rename` action for every field.

```auto
mutate {
    rename => { "field1" => "newField1"}
    rename => { "field2" => "newField2"}
    ...
    rename => { "fieldN" => "newFieldN"}
}

```

Would using one `mutate` filter and one `rename` action with the fields make any difference? Or in the end it will be the same thing?

```auto
mutate {
    rename {
        "field1" => "newField1"
        "field2" => "newField2"
        "fieldN" => "newFieldN"
    }
}

```

Anyone has a similar use case?

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [October 19, 2020, 9:05pm UTC](https://discuss.elastic.co/t/mutate-rename-multiple-fields-how-to-improve-performance/252606/2 "2020-10-19T21:05:02Z")

</div>

> [@leandrojmp](#):
>
> Or in the end it will be the same thing?

If there are multiple instances of an option on a filter they are merged when the configuration is parsed, so the two would be equivalent.

---

<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: [November 16, 2020, 9:05pm UTC](https://discuss.elastic.co/t/mutate-rename-multiple-fields-how-to-improve-performance/252606/3 "2020-11-16T21:05:04Z")

</div>

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