!lemmy_admin@lemmy.ml and a lot of SQL stuff in !lemmyperformance@lemmy.ml
Lemmy
Everything about Lemmy; bugs, gripes, praises, and advocacy.
For discussion about the lemmy.ml instance, go to !meta@lemmy.ml.
I'll x-post it over there.
Well, my bots haven't done anything apparently, but there are a couple thousand of them. I'm surprised considering my instance wasn't even listed anywhere lol. Have a query for safely deleting all but two accounts by chance?
Well- do note, it could very-well be normal user accounts too, which have not done anything at all.
Those queries show all users.
21,000 users with no comments, posts, or votes on an instance that's never been advertised and isn't on the community browser or thefederation... Yeah nah lol.
Can I just drop them from public.persons and move on?
I- wouldn't recommend that, without knowing the schema/layout better.
You can, however update public.persons set banned = 'true' where --criteria here
Yes, person table is top level. Delete from person table and it cascades down and deletes from other tables. User count also automatically updates. Just be careful because person table also contains federated users. There is a "local" column to determine if they are local users or not.
I had about 6k bot accounts, but they were all unverified, so I just deleted all local unverified accounts from the person table.
Just don't go messing with the database without backups. My host supports snapshots so I did a quick snapshot before messing with anything.
Ty. I have full disk, and literally one real user with one comment. Re-subbing would be the only annoying thing lol
Remember- any federated content is also stored on your database- Part of how this platform works.
If- you don't have much disk space- you might consider joining a larger instance.
(Also, you CAN clean up the activity table daily too)
Edit- I do have a kubernetes CRD which handles automatically purging the activity table, for data older than a couple days.
Apologies for the confusion, I meant I have full disk access.