Table log_link_visit_action is too big

Hi everyone!
I can’t update matomo DB to latest release due to great amount of query running time. I see that total size of my atomo DB is abt 12.2 GiB. Table log_link_visit_action is 7.3 GiB, and log_visit is abt 4.6 GiB

My installation Matomo worked for 10 months on site with everyday pageviews abt 130000.
All reccomendation for huge loaded servers I’ve implemented.

Now I need to find a way how to decrease table size. Is somebody can help me please?

I don´t know if you yet need it, but I pass by the same problem and I don´t find anything about this question. So, I put here what I did.

  1. Run the purge of old logs (https://matomo.org/faq/on-premise/managing-your-databases-size/#purging-and-optimizing-the-database-using-a-console-command:~:text=a%20LONG%20time.-,Purging%20and%20optimizing%20the%20database%20using%20a%20console%20command)
  2. Other way to do the same thing (https://matomo.org/faq/how-to/faq_20184/ and https://matomo.org/faq/troubleshooting/faq_42/)
  3. Run Optimize statment in your Mysql/MariaDB over the big tables (to discover the table´s size, look this: https://stackoverflow.com/questions/9620198/how-to-get-the-sizes-of-the-tables-of-a-mysql-database);
  4. Remove old reports (https://matomo.org/faq/how-to/faq_73/);

And some sites to help about how work with big tables:

https://mysql.rjweb.org/doc.php/deletebig

One problem that I passed was small space in the disk, so you need to change the temp space:

1 Like