The help provided by closed thread
# fwconsole mysql
Connecting to the Database…Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4164
Server version: 5.1.73 Source distribution
Copyright © 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trad…
was helpful. Thank you!
After running the command,
MariaDB [asterisk]> delete from asteriskcdrdb.cdr where calldate < now() - interval 3 MONTH;
Query OK, 744002 rows affected (58.40 sec)
My backup filesize went from
OPTIMIZE TABLE was no help.
Should it be this big?
Hmmm I don’t know. about OPTIMIZE TABLE.
October 30, 2020, 4:31pm
You should probably do the same thing with asteriskcdr.cel on the eventtime column.
Hey Dicko. How are you man
Yes you are right.
October 30, 2020, 4:34pm
très bien Franck mon vieil ami, et toi?
très bien, et toi?
Je vais bien aussi.
I’m good too, even if in France, the lockdown is restarted for 1 month (Dec 1th).
October 30, 2020, 4:37pm
Luckily we in the USA are just fine as we have ‘turned the corner’ according to our revered President.
(oops, looks like we took a left instead of a right at that corner
Whatever your choice the next week. I hopefully you will get the good one.
October 30, 2020, 5:57pm
“Optimize table” compresses the table down and re-validates all of the indices. Basically, it gets rid of all of the records that have been marked for deletion and reclaims the space in the table space, then it initiates an index update to point the index entries to the new places where the records are in the database.
The “best” time for an optimize is after you’ve deleted a series of records over a given period of time. Since this operation deleted a chunk of the dataspace, an optimize is warranted.
I already did the optimize table.
How do i
do the same thing with asteriskcdr.cel on the eventtime column
October 31, 2020, 10:42pm
delete from asteriskcdrdb.cel where eventtime < now() - interval 3 MONTH;
MariaDB [asterisk]> delete from asteriskcdrdb.cel where eventtime < now() - interval 3 MONTH;
Query OK, 3501280 rows affected (3 min 18.80 sec).
THANK YOU!! That brought the backup down to 46M
June 3, 2021, 10:57pm
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.