Skip Optimize for the archive script

Discussions about development of VICIDIAL and astGUIclient

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Skip Optimize for the archive script

Postby 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
RBecker
 
Posts: 43
Joined: Mon Aug 30, 2021 3:05 pm

Re: Skip Optimize for the archive script

Postby mflorell » Tue Apr 25, 2023 8:50 am

Sounds like a good idea. Please post your new code to the Issue Tracker and provide a link on this topic.

Thanks!
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Skip Optimize for the archive script

Postby RBecker » Fri Apr 28, 2023 1:15 pm

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
RBecker
 
Posts: 43
Joined: Mon Aug 30, 2021 3:05 pm


Return to Development

Who is online

Users browsing this forum: No registered users and 27 guests