DB maintenance


(Simon Telephonics) #1

I’m working on a server this weekend with a large accumulation of database records: approximately 150 million rows of CEL and more than 22 million rows of CDR. Other than occasionally going in and trimming, what do you use for regular database maintenance? Cron?

Also, I notice that the Distro mariadb config is default. Has anyone implemented any optimizations?


#2

I would start with

mysql asteriskcdrdb -e 'show table status'

If you are using InnoDB and disk space is not reclaimed on a DELETE query, maybe

If you are using MyISAM you can just use cron to purge before an arbitrary timestamp,