by RBecker » Tue Apr 25, 2023 8:36 am
We have a high volume system that runs nightly table archiving, and I see that part of this process is running an OPTIMIZE TABLE on the archive tables the data was inserted into. From my understanding there's no benefit to optimizing the table after inserting, only when deleting data from it. I have taken to running my own copy of this script with all of the optimizes removed, but that means that any time there is a code upgrade that adds new tables, I have to add those in manually. I propose a --skip-optimize-archive flag that could be added to that script which would skip those statements. There could also be a --skip-optimize-all flag that would skip optimizing the tables that data was just archived from. I run weekly optimizing across the entire system which is why I remove them from the nightly archive script. Hopefully this is something the team would like to pick up, but I could also write and submit a patch to Mantis for this if others are interested.
Managed & Dedicated ViciDial Hosting | VoIP Trunking and Termination | https://www.dial-fusion.com/
Main Cluster: 21 Agent Servers | Dedicated DB and Separate Reports Server | 2 Web Servers | HAProxy Load Balancing | Dedicated Archive Server