Skip to Content

Contributors

Re: Reducing the size of a database

I've seen this module:

https://apps.odoo.com/apps/modules/13.0/muk_autovacuum/

Obviously this can't be used on just any models, but for some models I 
guess such an approach can work.

Another idea I've proposed to a customer once, was to have a moment at 
end of year where you create an "archive copy instance" for that year, 
where people can login but not change anything. The code at that point 
is also frozen and copied with. It's a dirty approach, as you'll after N 
years be sitting with N archive instances, but there's a chance that at 
some point they'll start agreeing to delete the oldest instance (as at 
least here in NL, there's a year limit to which you are obliged to keep 
financial history). The upside to this approach is that you can 
aggressively start deleting records from live.

-Tom



by Tom Blauwendraat - 04:20 - 23 Jan 2024

Reference

  • Reducing the size of a database

    Dear contributors,

    Some of our customers have been using their database for more than 6 years. They want to reduce the size of the database, by archiving/aggregating old data (accounting entries, sales lines, stock movements, etc.). It would also be easier to do exports, pivot tables and so on.

    I see different solutions :

    1. Manually aggregate old data, with a specific method  by type of tables (account move lines, stock picking, sale order lines). For instance, aggregate old accounting entries with annual miscellaneous operations. Of course, we should keep a backup of the old data somewhere.

    2. Mass delete all the old and unused records, such as canceled POs, articles created by mistake. I don't see a way to do this quickly.

    Maybe an alternative solution would be a module that sets a "limit date" that acts as an automatic filter when doing exports, pivots, etc.

    Do you know any tool or procedure that would help with this ?

    Best regards,
    -- 
    Victor Champonnois - Coop IT Easy
    Tel : +32 475 81 01 12

    by Victor - 03:21 - 23 Jan 2024