# Questions on Async code using Ecto

**URL:** <https://forum.elixirforum.com/t/questions-on-async-code-using-ecto/21130>\
**Category:** Questions\
**Tags:** ecto\
**Created:** [March 25, 2019, 3:33pm UTC](https://forum.elixirforum.com/t/questions-on-async-code-using-ecto/21130 "2019-03-25T15:33:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![hauleth](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/hauleth/32/18942_2.png) [@hauleth](https://forum.elixirforum.com/u/hauleth)\
**Post date:** [March 25, 2019, 3:59pm UTC](https://forum.elixirforum.com/t/questions-on-async-code-using-ecto/21130/2 "2019-03-25T15:59:42Z")

</div>

1. I do not know if it would be possible while keeping all niceties of `SQL.Sandbox` (especially fact that everything is ran within single transaction, which allows asynchronous testing with Postgres).
2. [There is documentation of `Ecto.Adapters.SQL.Sandbox`](https://hexdocs.pm/ecto_sql/3.0.5/Ecto.Adapters.SQL.Sandbox.html).
3. Yes, Ecto checks out new connection from pool for each insert unless you will do it on your own via `Repo.transaction` or `Repo.checkout`
4. It depends on the task. You can even test it synchronously if you want. There is no “one-fit-them-all” solution.

---

_[View the full topic](https://forum.elixirforum.com/t/questions-on-async-code-using-ecto/21130)._
