Skip to main content
Odoo // Performance

Slow Odoo? Let's find the query that's ruining your day.

We measure before we change anything. Reproduce the slow workflow, trace it to the cause, fix that, and measure the same workflow again.

Tools
EXPLAIN ANALYZE · profilers
Layers
ORM · DB · workers · proxy
Proof
Before/after baselines

Measure, find the cause, fix the cause, measure again. Repeat until boring.

"Odoo is slow" is a symptom, not a diagnosis

Slowness has a location. It might be one list view that loads thousands of records, a computed field that queries the database once per line, a report that scans a whole table, a scheduled action that locks rows during working hours, or a server with too few workers for the number of people using it.

Each of those has a different fix, and a bigger server fixes almost none of them for long. So we start by turning complaints into measurements: which screen, which action, how long, for whom, and how often. Then we trace that exact workflow down to the code and queries behind it.

The tuning loop

  1. Step 01

    Reproduce

    Turn "it feels slow" into a repeatable workflow with timings, ideally on a recent copy of production data.

  2. Step 02

    Trace

    Profile ORM calls, SQL queries, and worker utilization during that workflow to see where the time actually goes.

  3. Step 03

    Fix the cause

    Add the missing index, batch the N+1 compute, rewrite the report query, move a scheduled job, or resize workers, whichever the evidence points to.

  4. Step 04

    Verify

    Re-run the same workflow, compare with the baseline, and keep the measurement for regression checks after future releases.

Symptoms and their usual causes

A starting map we use during triage. The profiler has the final word.

SymptomLikely causeTypical fix
One list view is slowUnindexed filter or sort, heavy computed columnsIndex, stored compute, or a lighter default view
Saving a record takes secondsCascading computes or slow constraintsNarrow dependencies; batch work
Everything slows at certain timesScheduled actions or imports competing for workersReschedule, split, or isolate cron workers
Reports time outFull-table scans or Python loops over large setsSQL views, pre-aggregation, or a reporting replica
Random freezes under loadToo few workers or long-running requestsWorker sizing, time limits, and request profiling

Where we look

PostgreSQL

Slow-query logs, query plans, missing or unused indexes, table bloat, and memory settings sized for the server.

Custom code

N+1 loops, computed fields without proper dependencies, and searches inside loops.

Workers & server

Worker count, memory limits, request time limits, and CPU or disk saturation.

Scheduled actions

Jobs that run too often, take too long, or lock records during business hours.

Proxy & assets

Compression, caching of static assets, and long-polling configuration behind the reverse proxy.

Reporting

Heavy analytical queries that belong on a read replica or in pre-aggregated tables.

Start with evidence

A typical find: a sequential scan over millions of stock moves, fixed by an index that matches the filter and sort.

slow-query.sqlsql
EXPLAIN (ANALYZE, BUFFERS)
SELECT id FROM stock_move
WHERE product_id = 4211 AND state = 'done'
ORDER BY date DESC LIMIT 80;

-- Seq Scan on stock_move ... rows removed by filter: 2,184,903
-- => CREATE INDEX CONCURRENTLY stock_move_product_state_date_idx
--      ON stock_move (product_id, state, date DESC);

Hardware is the last resort, not the first

Bigger servers hide inefficient queries for a while, then the data grows and the problem returns with a larger invoice. Fix the cause first; size hardware for real, measured load.

What you receive

  • A findings report ranked by impact and effort
  • Before and after timings for each fixed workflow
  • Index and configuration changes, documented
  • Code fixes for custom modules, with tests
  • Baseline workflows to re-run after future releases
  • Recommendations for monitoring slow queries going forward

Server sizing basics

Odoo handles requests with worker processes. Too few, and users queue behind each other; too many for the available memory, and the server starts swapping, which is worse. A common starting point is about two workers per CPU core plus one, with a separate allowance for scheduled actions, then adjusted from measurements of real concurrency.

PostgreSQL usually deserves as much attention as Odoo itself: memory settings sized to the server, fast disks, and autovacuum keeping up with busy tables. For larger deployments, separating the database from the application server and moving reporting to a replica gives each workload room to breathe.

Indexing rules we follow

Indexes speed up reads and slow down writes, so each one has to earn its place.

  • Index the filters and sorts that real workflows use
  • Composite indexes ordered with equality columns first
  • Partial indexes for small hot subsets, like open orders
  • Build in production with CREATE INDEX CONCURRENTLY
  • Remove unused indexes found in database statistics
  • Re-check plans after major data growth or upgrades

Metrics worth watching

Once tuned, these keep performance from quietly drifting back.

MetricWhy it matters
Request latency by routeShows which screens slow down as data grows
Worker utilizationSignals when users start queuing for capacity
Slow queriesCatches new problems introduced by code or data changes
Scheduled action durationFlags jobs creeping into working hours
Database size and bloatPredicts storage and vacuum problems early

Caching, carefully

Odoo already caches a lot internally. On top of that, we cache static assets at the proxy, cache public portal or website pages where content allows, and store computed values that are read far more often than they change. Every cache gets a clear invalidation rule, because a fast page with stale stock levels is worse than a slow one.

Starting points from the official documentation

Odoo's deployment guide gives a rule of thumb of (#CPU × 2) + 1 workers, and estimates around 1GB of RAM for a heavy worker and 150MB for a light one, assuming about 20% heavy requestsSource [1]. PostgreSQL's documentation suggests 25% of system memory as a reasonable starting value for shared_buffers on a dedicated server, and warns that work_mem applies per sort or hash operation, so total use can be many times the settingSource [2].

To find what's actually slow, the pg_stat_statements module tracks planning and execution statistics for every statement, and must be loaded through shared_preload_libraries, which needs a restartSource [3]. And because Odoo updates rows constantly, routine vacuuming matters: PostgreSQL lists reclaiming space, refreshing planner statistics, maintaining the visibility map, and preventing transaction ID wraparound as its purposesSource [4].

Quick wins we check first

Worker count versus CPU and memory, PostgreSQL memory settings, missing indexes on the slowest queries, scheduled actions running during business hours, and list views loading far more records than anyone scrolls through.

Frequently asked questions

Do imports and exports affect performance?
Large imports run in the same workers as your users. We schedule them off-peak, batch them, or move them to background jobs so they don't slow everyone down.
Can slow reports be fixed without rewriting them?
Often. An index, a stored field, or moving the report to a replica can make a large difference before any code changes.
Will upgrading Odoo make it faster?
Sometimes, since each release brings optimizations. But if the slowness comes from custom code or database design, it usually follows you to the new version. Tune first, or as part of the upgrade.
Can you set up performance monitoring?
Yes: slow-query logging, request timing, and dashboards with alerts, so regressions are caught in days, not months.
Is Odoo itself fast enough for large companies?
With proper architecture, yes: tuned PostgreSQL, enough workers, caching, and efficient custom code. Most slowness we find comes from configuration and custom code, not Odoo's core.
Do you need production access?
Read-only access to logs and a recent anonymized copy of the database are usually enough to start. Some measurements need short, scheduled access to production.
Will tuning require downtime?
Most fixes don't. Indexes can be built concurrently, and configuration changes are scheduled in low-traffic windows.
Can custom modules cause slowness?
Frequently. Computed fields without proper dependencies and loops that query inside them are the most common culprits we find.
How do we prevent regressions?
Keep the baseline workflows and re-run them after deployments, ideally automatically in CI against a staging copy.
Do you tune Odoo.sh instances?
Yes, within the platform's limits on server configuration. Code and query fixes apply anywhere.
Should we add a read replica?
If heavy reporting competes with daily operations, often yes. External reporting and BI tools can read from the replica while Odoo writes to the primary.
How long does a tuning engagement take?
A focused engagement on a few known slow workflows is typically short; broad audits of large instances take longer. Discovery sets the scope.
Is adding workers the fastest fix for a slow Odoo?
Rarely. More workers than your CPU and memory support makes things worse. Start from Odoo's guidance and fix the slow queries firstSource [1]Source [3].
Why does Odoo slow down over months?
Usually data growth with database maintenance falling behind. Healthy autovacuum and targeted indexes typically fix itSource [4].