Do I understand it correctly that the update script does something similar to this?
sudo -u www-data php7.3 console core:purge-old-archive-data all
Because that took over 10 minutes with my small DB and fast SSD, which means the update will time out for nearly all Matomo users (unless they do it from the cli, which nearly no one does).
@Findus23 The update adds the dates to the list that is used during scheduled task execution. So the next scheduled task run will run the equivalent of that command (though I think the table optimization is in it's own task).
@diosmosis I reckon it be enough to add this in the update script only for the months since march 2020 since that's when it was an issue?