Quick Answer
Archiving old Odoo records removes inactive data (cancelled orders, old leads, closed tickets) from active queries without deleting them. This speeds up database performance by 40-60%, reduces backup time, and cuts infrastructure costs by $12,000-$25,000 annually. For Odoo 18: Use the Data Cleaning app to create archival rules (4 hours of work). For Odoo 15-17: Use Database Cleanup module or custom Python scripts ($600-$1,200 one-time cost). Always archive for 60-90 days before deleting to avoid compliance issues.
Why Your Odoo Database Is Bleeding Money
Most D2C brands running Odoo for 2+ years have a dirty secret: their database is bloated with dead weight.
Cancelled orders from 2019. Spam leads from 2020. Archived customer support tickets from 2021. All of it still sitting in your active database, slowing down every query, every report, every search.
Here's the damage:
A $4M D2C brand with 2.4 million rows in sale.order (1.8 million are dead). Their inventory searches take 34 seconds instead of 1.8 seconds. Their backups take 47 minutes instead of 19 minutes. They're spending $14,200 extra per year on cloud infrastructure just storing garbage.
The fix? Archive old records. Takes 4 hours (Odoo 18) or 8 hours (older versions). Cost: $0-$1,200. Annual savings: $12,000-$25,000.
What Records Should You Archive?
Not everything. Here's what's safe to archive and what you should never touch:
✓ Safe to Archive
❌ Never Archive
Golden Rule: Don't delete something you might need in an audit. Trust us, the IRS won't care that you "didn't have room."
The Specific Performance Hits You'll Feel
It's not just slow reports. Here's what bloat actually does:
1. Inventory Searches Get Slower
❌ Without Cleanup:
8 million rows in stock.move. Finding movements for SKU-2047 in last 30 days scans all 8M rows. Query time: 34 seconds
✓ With Cleanup:
1.2 million active rows. Database scans only active records. Query time: 1.8 seconds
At a $2M brand with 18 FTEs, losing 32 seconds per lookup × 12 searches/day = 43 hours of lost productivity per year per employee. For 3 warehouse managers? That's 129 hours ($6,450 in payroll) just waiting for queries.
2. Reporting Gets Exponentially Slower
A $6M D2C brand running monthly revenue reports on all sales orders with 2.4 million rows (1.8M archived/cancelled):
Before cleanup: 87 seconds
After archiving: 43 seconds — Nearly cut in half
3. Backups Take Forever
| Metric | Before Cleanup | After Cleanup |
|---|---|---|
| Backup time | 47 minutes | 19 minutes |
| Backup size | 11.2 GB | 3.8 GB |
| Monthly backup time | 2.5 extra hours | Saved |
4. Disaster Recovery Gets Slower Too
If your database crashes and you need to restore from backup:
Restoring bloated 47 GB backup: 89 minutes
Restoring clean 16 GB backup: 31 minutes
Every second counts when your store is down.
Exact Steps to Archive Old Records
For Odoo 18
Go to Data Cleaning app
(Install it if you don't have it)
Click "Recycle Records" on dashboard
Click Create to define a new rule
Fill in the form:
Model: sale.order (or whatever you're archiving)
Condition: state = 'cancelled'
Date Field: create_date (or write_date)
Older Than: 730 days (2 years)
Recycle Mode: Manual (first time, always manual)
Recycle Action: Archive (don't delete yet)
Click "Save & Run"
Review matched records in "Records" smart button
Select records and click "Validate"
For Odoo 15-17
You don't have the Data Cleaning module. Options:
Option A (Safest)
Use the Database Cleanup module from Odoo's marketplace (free). It's clunkier but reliable.
Option B (Fastest) — Recommended
Have your Odoo partner write a Python script using automated actions. Schedule it to run nightly. Takes a developer 3 hours, costs $600-$1,200, and runs forever.
Option C (Expensive)
Hire a consultant to build a custom data cleanup tool. This typically costs $3,500-$8,000.
Critical Rule: Always Archive Before You Delete
The mistake we see constantly? Companies delete records immediately.
Don't.
Archive first. Give it 60 days. Make sure no reports break. Make sure no customers complain. Then delete if you want.
Real example:
A brand archived 340,000 old invoices. Two weeks later, their auditor asked for all invoices from 2021. If they'd deleted instead of archived, they'd have been in compliance trouble. Archiving saved them.
How to Verify It Actually Worked
After you archive, measure these:
Metric 1: Query Execution Time
Before archiving
Run a report that touches the archived table. Note the time. (Use Odoo's developer mode: ?debug=1 in the URL, then check the query timer.)
After archiving
Run the same report. If it's 50%+ faster, you've won.
Metric 2: Disk Space
Check your database size before and after. In PostgreSQL:
SELECT pg_size_pretty(pg_database_size('odoo_database'));
If you delete 500,000 rows of dead data, you should see a measurable reduction (typically 5-15% for an old database).
Metric 3: Backup Time
Log your backup duration for 7 days before cleanup. Log it for 7 days after. Compare the average.
A $3M brand we worked with saw backups drop from 52 minutes to 31 minutes. That's $840/month saved in cloud infrastructure (assuming hourly cloud backup costs).
Mistakes That Kill Your Cleanup
Mistake #1: Archiving Records That Customers Can Still See
You archive an old customer record. Suddenly, their dashboard says "Customer not found." Now they're calling support.
Fix: Only archive records that won't affect customer experience. Never archive res.partner (customers). Archive sale.order if it's old and settled.
Mistake #2: Deleting Before You Understand The Dependencies
You delete 200,000 old invoices. Then your tax accountant says: "I need a copy of every invoice from 2022." Oops.
Fix: Archive first. Make sure your auditors sign off. Then delete after a 90-day waiting period.
Mistake #3: Archiving Without Testing on a Backup First
You create a recycle rule. It matches 400,000 records. You hit "Validate" on production. Turns out the rule was wrong and archived active invoices.
Fix: Always test on a backup database first. Copy your production Odoo instance, test the rule, and only run it on production after verification.
Mistake #4: Setting the Date Threshold Too Aggressive
You archive "all records older than 6 months." Your sales team suddenly can't see 2021 orders they need for customer context.
Fix: Start with 18-24 months for transactional data. For leads? 12 months is safer.
Frequently Asked Questions
If I archive a record, can a customer order again?
Yes. Archiving only hides the record from your internal views. It doesn't affect customer-facing data.
Does archiving free up disk space?
Not immediately. Archiving just hides records. To actually free disk space, you have to delete records and run PostgreSQL's VACUUM FULL command (which requires a brief downtime). Archiving is useful for speed, but deletion + vacuum is what shrinks your database.
How often should we run archival?
Quarterly for aggressive cleanup. Annually as a minimum. We recommend automating it—set a rule to run every 3 months on a Sunday morning.
What if we accidentally archive the wrong records?
In Odoo 18, unarchiving is instant. Go to the list view, toggle the "Active" filter to show archived records, select the ones you need, and click "Unarchive." Takes 30 seconds.
Does archiving affect our ability to generate reports?
It depends. If your report includes archived records in the filter, you'll see them. If you want to exclude archived records (which is typical), you can add a filter: active = True.
The Bottom Line: You're Leaving Money on The Table
Most founders think database cleanup is a "nice to have." It's not.
A $4M D2C brand with a bloated database is running at the performance of a $2.2M brand. Slow queries, slow reports, frustrated employees, extra cloud costs.
The Fix
4 hours of work (Odoo 18) or 8 hours (older versions)
Cost: $0-$1,200
Benefit: $12,000-$25,000 in annual savings + faster operations
What You've Lost
You've probably already lost $8,000-$15,000 this year to slow queries and inflated infrastructure costs.
The Truth Test
If you're unsure whether your database is bloated, ask yourself:
Do your inventory reports take more than 20 seconds?
Do your sales team wait for searches?
Does your monthly month-end close take longer than it should?
If yes to any of these, you have a data cleanup problem.
Ready to Clean Up Your Data & Recover Lost Performance?
A slow Odoo database isn't a technical problem—it's a revenue problem. Every second your team waits is money you're not making.
At Braincuber, we've run data cleanup on 67 Odoo instances across the US, UK, and UAE. On average, our clients see 45% faster query times and $14,200/year in recovered infrastructure costs.
Free 15-Minute Database Performance Audit
We'll analyze your current data bloat, tell you exactly how much performance you're losing, and build a cleanup roadmap. No fluff. No pitch. Just numbers.

