Guys, why it's not cleaning up itself?
bpmn_process table is huge
Collapse
X
-
If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks. -
Thank youhttps://docs.espocrm.com/administrat...nded-processes
It's been covered couple of times on the forum.Comment
-
yuri, please help, how can I remove all flowchart processes after 30 days?
If I setup "deleted = 1;" it will delete immediately, if I add a timer..I feel that's wrong, what's the best way? Maybe some config variable that can be setup?
Sorry, thanksComment
-
-
Optimizations for MySQL / MariaDB:
https://forum.espocrm.com/forum/gene...abase-filesize
Usefule Scripts (DB), based on Linux-VM and MariaDB:
Code:SELECT table_name AS "Table", ROUND(((data_length + index_length) / 1024 / 1024), 2) AS "Size in (MB)" FROM information_schema.TABLES WHERE table_schema = "crm" ORDER BY (data_length + index_length) DESC limit 10;
where "table_schema" = Name of the DB.
Personally I use the following for tables not cleaning themself:
PHP (Espo Command) to defrag index:Code:delete from bpmn_flow_node where created_at < now() - interval 30 DAY; delete from bpmn_process where created_at < now() - interval 30 DAY; delete from scheduled_job_log_record where created_at < now() - interval 30 DAY; delete from job where created_at < now() - interval 30 DAY;
Optimize DB (SSH):Code:php /var/www/crm/rebuild.php
where crm is the name of the DB.Code:mysqlcheck -u root -p --optimize crm
Sources:Comment
-
ThanksOptimizations for MySQL / MariaDB:
https://forum.espocrm.com/forum/gene...abase-filesize
Usefule Scripts (DB), based on Linux-VM and MariaDB:
where "table_schema" = Name of the DB.Code:SELECT table_name AS "Table", ROUND(((data_length + index_length) / 1024 / 1024), 2) AS "Size in (MB)" FROM information_schema.TABLES WHERE table_schema = "crm" ORDER BY (data_length + index_length) DESC limit 10;
Personally I use the following for tables not cleaning themself:
PHP (Espo Command) to defrag index:Code:delete from bpmn_flow_node where created_at < now() - interval 30 DAY; delete from bpmn_process where created_at < now() - interval 30 DAY; delete from scheduled_job_log_record where created_at < now() - interval 30 DAY; delete from job where created_at < now() - interval 30 DAY;
Optimize DB (SSH):Code:php /var/www/crm/rebuild.php
where crm is the name of the DB.Code:mysqlcheck -u root -p --optimize crm
Sources:Comment

Comment