Don’t think it has anything to do with “Ecto efficiency”.
Automatically preloading association was one of the biggest source of performance issues in Rails with N+1 queries, I am really glad that Ecto does not do that by default, it forces you to understand what exactly your code needs (I love when libraries nudges you to good, explicit/obvious patterns).
Anyway, I do like User.find_by(email: "email") style of code (which you can also use Repo.get_by() btw, but I was missing it for context functions, so I created a small library here GitHub - edisonywh/condiment: 🍡 Add flavors to your context function without the hassles. · GitHub that helps make this easier.
EDIT: Like nobbz pointed out as well, you can define a .iex.exs file, on the app level or on the global level, and that saves you a lot of typing too.






















