Only use this SQLs if you exactly know what you are doing.
After a few years of running metasfresh on heavy load systems with dozens of users you might want to reduce the size of some table constellations. Data in those tables is not needed to run metasfresh once its processed but if you delete while its need you crash the system. Some data might also be very interesting for troubleshooting.
Only apply if no pending print jobs are existing and you dont need past data.
Only apply if no pending async jobs are existing and you dont need past data.
truncate c_queue_workpackage, c_queue_block, c_queue_element,c_queue_workpackage_log,c_queue_workpackage_param;
truncate ad_issue,ad_processablepo,c_advcommissionfactcand, c_advcommissionfact, c_incidentlinefact,c_advcomfact_salesrepfact
optional constraints that can be dropped:
alter table msv3_bestellung_transaction drop constraint adissue_msv3bestellungtransaction ; alter table msv3_verfuegbarkeit_transaction drop constraint adissue_msv3verfuegbarkeittransaction;