Plex team will not fix it and will not answer. I just removed statistics table from DB ~ year ago and forgot about this issue (sometimes I can see warnings in log - “statistics table does not exist, bla bla bla …”).
The above linked issue was a side effect of a client in the local network which was not signed into the plex account.
But a fix for this should already be in your server release.
Do you let your server perform its maintenance routine during the night?
If not, do it.
Very interesting, I thought I want to try deleting the records that have no account_id (NULL) via command line sqlite that comes with plex. That took forever for just 100 records, so I transferred it onto my desktop machine and used the sqlite browser to do the same. Deleting 1m records takes around 8s.
But then I tried optimize DB as you mentioned and lo and behold, this was speedy (how do you do this???*) and now the DB is… 58MB.
I think it all has to do with my outdated MacOS client - I am one of those HTPC users.
Thank you drzoidberg33!
Edit 1: Update Nov 28th: I just checked again, DB is still small, a single new record on the statistics table.