# Populating database from CSV file

**URL:** <https://forum.elixirforum.com/t/populating-database-from-csv-file/44842>\
**Category:** Questions\
**Tags:** phoenix, seed\
**Created:** [December 27, 2021, 8:03am UTC](https://forum.elixirforum.com/t/populating-database-from-csv-file/44842 "2021-12-27T08:03:40Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![trisolaran](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/trisolaran/32/23748_2.png) [@trisolaran](https://forum.elixirforum.com/u/trisolaran)\
**Post date:** [December 28, 2021, 1:02pm UTC](https://forum.elixirforum.com/t/populating-database-from-csv-file/44842/10 "2021-12-28T13:02:47Z")

</div>

Ok then you should ditch `Enum.map` and use `Enum.each` instead, because you are only running `column_data` for the side effects, you don’t care about what it returns.

It makes the code clearer and I think also more efficient: `Enum.map` will store the result of the mapping in memory, and this could be a lot if you have a lot of rows.

---

_[View the full topic](https://forum.elixirforum.com/t/populating-database-from-csv-file/44842)._
