Question ???
From discussion in this thread,
Was this not preformed ?
chuck@ds418j:/volume2/chuck/Deflate/databases.2025.05.17$ cat Deflate
#!/bin/bash
PSQL="/var/packages/PlexMediaServer/target/Plex SQLite"
echo ==== Current listing
ls -lah
echo ==== Vacuuming into new DB
time "$PSQL" com.plexapp.plugins.library.db << EOT
CREATE TABLE temp_bandwidth as select * from statistics_bandwidth where account_id not null;
DROP TABLE statistics_bandwidth;
ALTER TABLE temp_bandwidth RENAME to statistics_bandwidth;
CREATE INDEX 'index_statistics_bandwidth_on_at' ON statistics_bandwidth ('at');
CREATE INDEX 'index_statistics_bandwidth_on_account_id_and_timespan_and_at' ON 'statistics_bandwidth' ('account_id', 'timespan', 'at');
VACUUM main into './new.com.plexapp.plugins.library.db';
EOT
echo ==== Deflated DB listing
ls -lah new.com.plexapp.plugins.library.db
chuck@ds418j:/volume2/chuck/Deflate/databases.2025.05.17$
How it works,
The last step is what deflated the DB.
When done, rename the DBs and all is complete.