Can I partition the radacct and radpostauh tables by month?

Alan DeKok aland at
Sun Jan 19 14:33:28 CET 2020

On Jan 19, 2020, at 7:47 AM, CESAR MURILO DA SILVA JUNIOR <cesarsj at> 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.

More information about the Freeradius-Users mailing list