# Dynamic\_templates vs Template API

**URL:** <https://discuss.elastic.co/t/dynamic-templates-vs-template-api/252478>\
**Category:** Elasticsearch\
**Created:** [October 19, 2020, 6:31am UTC](https://discuss.elastic.co/t/dynamic-templates-vs-template-api/252478 "2020-10-19T06:31:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vorapoap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vorapoap/32/66582_2.png) [@vorapoap](https://discuss.elastic.co/u/vorapoap)\
**Post date:** [October 19, 2020, 6:31am UTC](https://discuss.elastic.co/t/dynamic-templates-vs-template-api/252478/1 "2020-10-19T06:31:46Z")

</div>

In term of indexing performance.

Which one is faster? between using dynamic\_templates vs Template API

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 19, 2020, 6:53am UTC](https://discuss.elastic.co/t/dynamic-templates-vs-template-api/252478/2 "2020-10-19T06:53:04Z")

</div>

If we assume the same mappings are applied in both cases (mappings can impact performance as the amount of work that need to be done varies) it does not make any difference if these are created through an index template or dynamic mapping.

---

<div class="post-metadata">

**Author:** ![vorapoap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vorapoap/32/66582_2.png) [@vorapoap](https://discuss.elastic.co/u/vorapoap)\
**Post date:** [October 19, 2020, 10:32am UTC](https://discuss.elastic.co/t/dynamic-templates-vs-template-api/252478/3 "2020-10-19T10:32:37Z")

</div>

Dynamic template and dynamic mapping perform similarly, you mean?

---

<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, 10:32am UTC](https://discuss.elastic.co/t/dynamic-templates-vs-template-api/252478/4 "2020-11-16T10:32:43Z")

</div>

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