The Ecto tab (ADR 08): every query of the page,
oldest first, with SQL, params, timings, rows and the code that ran it, N+1
groups flagged above them, EXPLAIN for SELECTs and a JSON export. Part of
:defaults.
config :phoenix_dev_toolbar, repos: [MyApp.Repo]Options
| Option | Type | Default |
|---|---|---|
repos: | list of repo modules | the top level repos config, else the :ecto_repos of the loaded applications |
n_plus_one: | integer >= 2, or false to turn the detector off | 5 |
repos: in the plugin entry wins over the top level config:
config :phoenix_dev_toolbar,
plugins: [:defaults, {PhoenixDevToolbar.Plugins.Ecto, repos: [MyApp.Repo], n_plus_one: 3}]With no repos found, the tab stays empty and one warning names the config line.
Set stacktrace: true in the repo's config to see where each query comes from.
ecto_sql is an optional dependency: without it this plugin attaches to nothing.