This module lets you log slow SQL statements. It is useful when you don't have access to the PostgreSQL log or when it is difficult to correlate the PostgreSQL log with the Odoo log.
> [!WARNING] > This module may leak confidential data in the log, in a similar way to > Odoo's --log-level=debug_sql option. Use with care.
auto_awesome What this module does
AI-generated from the code · Odoo 17.0Logs slow SQL statements so administrators can spot database queries that take too long. It adds no menus or screens; it works in the background.
This is a technical tool for Odoo administrators. It records SQL statements that run slowly, which helps when the PostgreSQL database log is not available or is hard to match with the Odoo log.
- It does not add any menu, screen, button or report, and it does not create or change any business model.
- It has no dependencies on other modules and no external Python libraries.
- The manifest only declares the module name, summary, version, author, license, website and category (Tools).
The source code provided here is only the manifest file, so the actual logging logic (for example the time threshold that decides when a statement is considered slow, and where the messages are written) is not visible. Because of that, this description stays limited to what the manifest shows: the module exists to log slow SQL statements and it is installed as a tool.
Be aware that, like Odoo's debug_sql log level, this kind of logging can expose confidential data in the log, so it should be used with care.
Text generated by AI (DeepSeek) from reading the Odoo 17.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 4 confirmed, 5 with no information of 9 versions.
Sources · Odoo 14.0
Confirmed on 2026-11-03 in branch 14.0 of OCA/server-tools.
terminal Installation and usage
OCA documentation · Odoo 17.0Usage
Source · Odoo 17.0Add slow_statement_logger to Odoo's --load command line option, or to the server_wide_modules configuration file entry.
Add a log_min_duration_statement entry in the options section of your Odoo configuration file. Statements running at least this number of milliseconds will be logged with a debug level in the odoo.addons.slow_statement_logger logger. 0 means all statements will be logged. -1 disables this logging. You can also set an environment variable ODOO_LOG_MIN_DURATION_STATEMENT which will have priority over the configuration file entry.
Add odoo.addons.slow_statement_logger:DEBUG in your log_handler configuration file entry or --log-handler command line option.
No verified information in OCA: Installation, Configuration.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.