Whatever in iex> or using mix run -e \"My.code\" when I run the mix project using ecto, the Ecto\'s Debugging Mechanism display a bunch of SQLs like
Your logging level is configured in your config/#{env}.exs files. If you look into config/prod.exs it most likely already has that level set to :info:
config :logger, level: :info
So if you run the app with MIX_ENV=prod iex -S mix you won't get the debug output. This means that when you build a release with something like MIX_ENV=prod mix release the resulting build won't be producing this output. Alternatively you may set level: :info or :warn for whatever environment you want by changing the appropriate config/#{env}.exs.