Can I partition the radacct and radpostauh tables by month?
Hello, I went to delete the records with more than 30 days (there are 96 million currently) in radacct, and gave a table lock that stopped the wifi in the whole company. The delete was inside a transaction. I believe that if I partition the radacct and radpostauth tables I will be saved from this problem. Att *César Murilo da Silva Júnior* *Téc. Oper. Monit. Computadores Help Desk | Redes e Segurança* *UNIPAM - Centro Universitário de Patos de Minas* *T1: 34 3823 0131 | T2: 34 3823 0120 | T3: 34 3823 0356 | C: 34 9 9220 5680* *cesarsj@unipam.edu.br <cesarsj@unipam.edu.br>* <https://www.unipam.edu.br/index.php/> <https://www.facebook.com/unipam> <https://www.instagram.com/unipamnet/?hl=pt> <https://twitter.com/UNIPAMNET> <https://www.youtube.com/user/CanalUNIPAM> <https://www.linkedin.com/school/centro-universit-rio-de-patos-de-minas---unipam/> <https://api.whatsapp.com/send?phone=5534999776622>
On Jan 19, 2020, at 7:47 AM, CESAR MURILO DA SILVA JUNIOR <cesarsj@unipam.edu.br> wrote:
I went to delete the records with more than 30 days (there are 96 million currently) in radacct, and gave a table lock that stopped the wifi in the whole company. The delete was inside a transaction. I believe that if I partition the radacct and radpostauth tables I will be saved from this problem.
That will work. Also, you should be able to use "LIMIT 1234" on queries, so that the entire table isn't locked. Though IIRC MySQL isn't good about that. You should also have cron jobs which regularly delete old data. You can run them daily, if necessary. Alan DeKok.
participants (2)
-
Alan DeKok -
CESAR MURILO DA SILVA JUNIOR