I just removed a ton of these account_id=NULL entries from the statistics_media table. Not sure what is causing them. That table was by far the largest table in the database before, now it is somewhere in the middle.
For anyone that needs to remove these here are the steps:
Stop Plex
Open a command window and navigate to the Databases directory, in windows it is:
C:\Users\your_name\AppData\Local\Plex Media Server\Plug-in Support\Databases
Create a backup copy of your com.plexapp.plugins.library.db file before doing anything.
copy com.plexapp.plugins.library.db com.plexapp.plugins.library.db.backup
Open the database in sqlite3
sqlite3.exe com.plexapp.plugins.library.db
If you want to see how many rows have a NULL account id run the following command
select count(*) from statistics_media where account_id is NULL;
Run the following command to delete the rows with NULL account_id
delete from statistics_media where account_id is NULL;
Start Plex
In Plex go to Settings / Troubleshooting and click Optimize Database