Can I delete unused items from storage?
https://friendica.exon.name/display/97d67096-9263-b3d3-bd20-40b573125024I'm behind on releases, I'm still on 2022.06. One thing preventing me upgrading is that I need to make a full backup for upgrading, but my database has blown up in size.
For me, the new storage table is pretty unfamiliar. But it seems to me that there's a lot of unused data there. Everything in storage must be either a photo or an attachment - right? I have 191433 rows in storage
. I have 127206 rows in photo
, and just one in attach
. And it seems that the remaining rows are using 12GB, about half of the space of the whole DB:
MariaDB [friendica]> select count(*), sum(octet_length(storage.data)) from storage left outer join photo on storage.id = photo.`backend-ref` where photo.id is null;
+----------+---------------------------------+
| count(*) | sum(octet_length(storage.data)) |
+----------+---------------------------------+
| 63459 | 13781405163 |
+----------+---------------------------------+
Am I right that I could just delete those rows (except for the single row in attach
)?
Comments 0