Odoo can handle a wide range of business operations—from CRM and sales to inventory, manufacturing, accounting, websites, and eCommerce.
But as an Odoo database grows, something eventually happens in many implementations:
The system starts getting slower.
A page that previously loaded in one second may take five seconds.
A sales order confirmation may take noticeably longer.
Inventory operations may become sluggish.
Reports can take minutes.
Scheduled jobs may start accumulating.
And users often reach the same conclusion:
"We need a bigger server."
Sometimes that's true.
But very often, adding CPU and RAM isn't the real solution.
Odoo performance is influenced by several layers working together:
Users → Odoo → Python/ORM → PostgreSQL → Operating System → Hardware
A problem at any one of these layers can affect the entire application.
In this guide, we'll look at practical ways to diagnose and improve Odoo 19 performance.
1. Start With the Real Problem
The first rule of performance optimization is simple:
Don't optimize what you haven't measured.
Before changing configuration, identify what is actually slow.
Ask:
- Is the entire Odoo instance slow?
- Is only one module slow?
- Are specific screens slow?
- Are reports taking too long?
- Are scheduled actions consuming CPU?
- Are database queries slow?
- Does performance degrade only during peak hours?
- Is the server running out of memory?
- Is PostgreSQL consuming most of the resources?
These questions help identify the actual bottleneck.
For example:
If opening a customer form takes 8 seconds but the rest of Odoo is fast, increasing the server from 8 CPU cores to 32 cores may not solve the problem.
The issue could be a poorly written computed field or an inefficient database query.
2. Understand Odoo's Performance Architecture
A typical Odoo deployment contains several important components:
Users │ ▼ Nginx / Load Balancer │ ▼ Odoo Workers │ ▼ Python / ORM │ ▼ PostgreSQL │ ▼ Storage
Each layer can become a bottleneck.
Application layer
Problems may include:
- Inefficient Python code
- Excessive ORM calls
- Poorly designed computed fields
- Large loops
- Unnecessary record creation
Database layer
Problems may include:
- Missing indexes
- Inefficient SQL queries
- Large tables
- Table bloat
- Poor PostgreSQL configuration
Infrastructure layer
Problems may include:
- Insufficient CPU
- Insufficient RAM
- Slow storage
- Network latency
- Improper virtualization
Good performance optimization therefore requires looking at the whole stack, not only Odoo.
3. Configure Odoo Workers Correctly
One of the most important production settings is the number of Odoo workers.
A common mistake is to run Odoo with a configuration that doesn't match the available CPU and memory.
For example:
[options] workers = 8 max_cron_threads = 2
The exact values should depend on:
- CPU cores
- Available RAM
- Number of concurrent users
- Type of workload
- Number of scheduled jobs
- Whether the server hosts other applications
More workers do not automatically mean better performance.
If you configure too many workers, the server may spend excessive resources on processes instead of actually processing business requests.
4. RAM Is Just as Important as CPU
Odoo workers consume memory.
PostgreSQL consumes memory.
The operating system needs memory.
Background processes consume memory.
Therefore, worker configuration must be considered together with available RAM.
A server with 32 CPU cores but insufficient RAM can still perform poorly.
A useful approach is to estimate memory consumption per Odoo worker and leave sufficient memory for:
- PostgreSQL
- Operating system
- Nginx
- Background services
- Monitoring tools
- Temporary processes
The goal isn't to use 100% of available memory.
The goal is to maintain predictable performance under peak load.
5. Optimize the Odoo ORM
For Odoo developers, this is one of the most important areas.
Consider code like:
for order in orders:
for line in order.order_line:
print(line.product_id.name)
This may look harmless.
But when orders contains thousands of records, inefficient access patterns can generate a large number of database queries.
Odoo's ORM provides tools that allow developers to work efficiently with recordsets.
Instead of repeatedly accessing data inside deeply nested loops, consider:
- Recordset operations
- mapped()
- filtered()
- Batch operations
- Prefetching
- Computed field optimization
The principle is simple:
Reduce unnecessary database round trips.
6. Avoid Database Queries Inside Loops
This is one of the most common performance problems in custom Odoo modules.
Consider:
for product in products:
record = self.env['stock.quant'].search([
('product_id', '=', product.id)
])
If there are 10,000 products, this can result in a huge number of queries.
A better approach is often to retrieve the required records in a single operation and process them in memory.
For example:
quants = self.env['stock.quant'].search([
('product_id', 'in', products.ids)
])
Then group or process the result.
The exact implementation depends on the use case, but the underlying principle remains:
Batch database operations whenever possible.
7. Use Database Indexes Carefully
Indexes can dramatically improve database query performance.
For example, if a custom module frequently searches a field:
partner_reference
and the table contains millions of records, an appropriate database index may significantly reduce lookup time.
However, indexes aren't free.
Every additional index can increase:
- INSERT cost
- UPDATE cost
- DELETE cost
- Storage requirements
Therefore, don't create indexes on every field.
Create them based on actual query patterns and measured performance.
8. PostgreSQL Is Critical to Odoo Performance
Odoo depends heavily on PostgreSQL.
A healthy PostgreSQL configuration can make a significant difference to the overall application.
Important areas include:
- Shared buffers
- Work memory
- Effective cache size
- Checkpoints
- WAL configuration
- Autovacuum
- Connection management
- Query planning
The correct values depend heavily on:
- Available RAM
- Database size
- Storage type
- Query workload
- Concurrent users
A configuration that works well for a 10 GB database may not be appropriate for a 500 GB database.
9. Don't Ignore Autovacuum
Large Odoo databases generate enormous numbers of INSERT, UPDATE, and DELETE operations.
PostgreSQL's MVCC architecture means that old row versions need to be cleaned up.
That's where VACUUM and autovacuum become important.
If autovacuum isn't keeping up, you may experience:
- Table bloat
- Larger indexes
- Slower queries
- Increased disk usage
- Poorer cache efficiency
For large Odoo databases, PostgreSQL maintenance should be treated as part of regular infrastructure management—not something to investigate only after the database becomes slow.
10. Optimize Computed Fields
Computed fields are extremely useful in Odoo.
But poorly designed computed fields can create serious performance problems.
For example, imagine a computed field that:
- Searches thousands of records
- Loops through every related record
- Executes additional searches
- Recomputes frequently
A field that takes 10 ms to calculate may seem insignificant.
But if it runs 100,000 times, the impact becomes substantial.
When optimizing computed fields:
- Use proper dependencies.
- Avoid unnecessary searches.
- Batch calculations.
- Avoid nested database operations.
- Consider whether the value really needs to be computed dynamically.
11. Be Careful With @api.onchange
@api.onchange is useful for improving the user interface.
However, complex onchange logic can make forms feel slow.
For example:
@api.onchange('product_id')
def _onchange_product_id(self):
...
If this method performs multiple searches or processes large recordsets, users may experience delays every time they change the product.
Keep onchange methods lightweight whenever possible.
If the calculation doesn't need to happen interactively, consider moving it to another part of the business process.
12. Scheduled Actions Can Become Hidden Bottlenecks
Cron jobs are essential in Odoo.
They handle tasks such as:
- Automated emails
- Scheduled invoices
- Data synchronization
- Queue processing
- Cleanup operations
- Recurring business processes
But poorly designed cron jobs can consume significant resources.
A common example is a scheduled action that processes millions of records in a single transaction.
Instead of:
records = self.search([])
for record in records:
...
consider processing data in batches.
For example:
records = self.search([], limit=1000)
Then continue processing in manageable chunks.
This reduces:
- Memory consumption
- Transaction size
- Lock duration
- Processing spikes
13. Large Reports Need Special Attention
Reports are often responsible for some of the slowest operations in an ERP.
Examples include:
- Inventory valuation
- Stock movement reports
- Sales analysis
- Accounting reports
- Manufacturing reports
The problem is often not Odoo itself.
It may be the underlying query.
If a report:
- Retrieves millions of records
- Performs Python-level calculations
- Groups the data manually
- Generates a large XLSX or PDF
then performance can degrade significantly.
For large datasets, consider:
- SQL aggregation
- Proper indexes
- Pagination
- Precomputed data
- Database views
- Background processing
- Caching
14. Avoid Loading Thousands of Records Into the Browser
The frontend is another important performance layer.
Imagine a form that loads:
- 20,000 one2many records
- Hundreds of fields
- Large binary attachments
- Multiple relational fields
Even if the server responds quickly, the browser may struggle to render the page.
Good UI design matters.
Use:
- Pagination
- Search
- Filters
- Kanban/list views appropriately
- Lazy loading
- Limited datasets
Don't make the browser render information the user doesn't need.
15. Optimize Attachments and Filestore
Odoo stores attachments separately from normal business records.
Large numbers of attachments can create:
- Storage growth
- Backup challenges
- Slow file operations
- Increased network traffic
For large installations, pay attention to:
- Filestore storage
- Disk performance
- Backup strategy
- Attachment cleanup
- Available disk space
Fast SSD/NVMe storage can make a noticeable difference for database-heavy workloads.
16. Use Monitoring Instead of Guessing
A production Odoo environment should be monitored continuously.
Useful metrics include:
Server
- CPU usage
- RAM usage
- Disk usage
- Disk I/O
- Load average
PostgreSQL
- Active connections
- Slow queries
- Cache hit ratio
- Locks
- Long-running transactions
Odoo
- Request duration
- Worker utilization
- Cron execution
- Error rates
- Queue backlog
Tools such as Prometheus and Grafana can be used to build dashboards around infrastructure and application metrics.
Monitoring turns:
"Odoo feels slow."
into:
"The database I/O latency increased significantly during the inventory valuation job."
That difference makes troubleshooting much easier.
17. Use Profiling for Difficult Problems
When a specific operation remains slow, profiling can help identify where the time is being spent.
Instead of guessing:
Maybe PostgreSQL is slow. Maybe Python is slow. Maybe the network is slow.
profiling helps identify the actual bottleneck.
For custom Odoo development, profiling can reveal:
- Slow methods
- Excessive ORM queries
- Repeated function calls
- Expensive computations
- Unexpected database access
This is particularly useful for large custom modules.
18. Don't Forget Nginx
In production deployments, Odoo is often placed behind Nginx.
Nginx can handle:
- SSL termination
- Reverse proxying
- Static content
- Compression
- Connection handling
- Request limits
A properly configured reverse proxy can improve overall reliability and scalability.
However, Nginx should not be blamed automatically when Odoo is slow.
If the upstream Odoo request itself takes 10 seconds, tuning Nginx won't magically make the business logic execute faster.
Always identify the slowest layer first.
19. Use Longpolling and Real-Time Features Properly
Odoo uses separate mechanisms for real-time communication and long-running connections.
Incorrect deployment or proxy configuration can lead to:
- Connection problems
- Delayed notifications
- Chat issues
- Poor real-time performance
For production deployments using these features, verify that the reverse proxy and Odoo services are configured correctly.
20. Consider Horizontal Scaling for Larger Deployments
When an Odoo environment becomes large enough, simply increasing the size of one server may no longer be the best approach.
A scalable architecture can look like:
Load Balancer
│
┌────────────┴────────────┐
│ │
Odoo #1 Odoo #2
│ │
└────────────┬────────────┘
│
PostgreSQL
│
Shared Storage
This architecture can help support higher concurrency and improve availability.
However, scaling should come after application and database optimization.
There is little value in running four Odoo servers if the custom code itself is inefficient.
21. A Practical Performance Optimization Checklist
Before increasing server capacity, review the following.
Application
- Review slow Odoo operations
- Identify inefficient custom modules
- Reduce ORM queries
- Batch database operations
- Optimize computed fields
- Review onchange methods
- Optimize scheduled actions
Database
- Identify slow queries
- Review indexes
- Check table and index bloat
- Verify autovacuum
- Review PostgreSQL configuration
- Monitor locks and long transactions
Server
- Monitor CPU
- Monitor RAM
- Monitor disk I/O
- Check storage capacity
- Review worker configuration
- Check network latency
Frontend
- Avoid huge datasets in views
- Reduce unnecessary fields
- Use pagination
- Optimize JavaScript/Owl components
- Review large dashboards
Monitoring
- Monitor Odoo
- Monitor PostgreSQL
- Monitor infrastructure
- Track slow operations
- Set alerts for resource saturation
22. The Most Important Lesson
When an Odoo system becomes slow, the first reaction is often:
"We need a bigger server."
But performance optimization should follow a different approach:
Measure → Identify → Optimize → Test → Monitor
Only after those steps should you determine whether additional infrastructure is actually required.
A well-optimized Odoo deployment can often deliver much better performance without simply throwing more hardware at the problem.
Conclusion
Odoo 19 performance isn't controlled by a single configuration parameter.
It is the result of several components working together:
Odoo configuration + custom code + ORM + PostgreSQL + infrastructure + frontend + monitoring
The biggest performance improvements often come from fixing inefficient queries, optimizing custom modules, configuring workers correctly, maintaining PostgreSQL, and identifying bottlenecks through monitoring.
For businesses running Odoo in production, performance optimization should also be treated as an ongoing process.
As the database grows, the number of users increases, and business workflows become more complex, performance requirements change.
The goal isn't simply to make Odoo fast today.
The goal is to build an Odoo environment that continues to perform well as your business grows.
At Optura Technologies, we help businesses optimize, customize, migrate, integrate, and manage Odoo environments—from application-level optimization and custom development to PostgreSQL and production server tuning.
If your Odoo system is becoming slower as your business grows, the right question isn't always:
"Should we buy a bigger server?"
Sometimes the better question is:
"What is actually making Odoo slow?"
Have an Odoo Requirement? Let's Talk.
Whether you're planning a new Odoo implementation, struggling with performance issues, or looking to build custom integrations — we're here to help.
Our team works with businesses of all sizes to design, develop, and optimize Odoo solutions that actually fit the way you work. From queue job architecture to full-scale ERP customization, we've got you covered.
📩 Reach out to us at: contact@opturatech.com 🌐 Whatsapp us at: +91 7025199191.
Or simply fill out our Contact Form → and we'll get back to you within one business day.
Frequently Asked Questions
How can I improve Odoo 19 performance?
Start by identifying the actual bottleneck. Review Odoo workers, custom code, ORM queries, PostgreSQL performance, scheduled jobs, storage, and server resources.
Does increasing Odoo workers improve performance?
Not necessarily. Workers should be configured according to CPU, RAM, concurrent users, and workload. Too many workers can create unnecessary resource consumption.
Why is my Odoo database slow?
Potential causes include inefficient queries, missing indexes, database bloat, inadequate PostgreSQL configuration, long-running transactions, or inefficient custom modules.
Does adding RAM make Odoo faster?
Additional RAM can improve performance when the system is memory-constrained, but increasing RAM will not fix inefficient application code or database queries.
How do I find slow Odoo queries?
Use PostgreSQL monitoring and Odoo profiling tools to identify expensive queries and long-running operations. For custom development, profiling can help determine whether the bottleneck is Python code, ORM operations, or PostgreSQL.
How often should Odoo performance be reviewed?
Performance should be monitored continuously in production and reviewed whenever there is a significant increase in users, database size, transactions, customizations, or business workload.