orphan record finder and [deleted user] removal.
preamble...
if you had 10000 spam applicants) and you declined them or used cleanser (which uses the delete user and content option) and you only had 20 members. you would have 100000-20 wasted entries in user table.
Q1 - do you think there is any significant performance increase removing users? Certainly the database table would be smaller.
I was writing a plugin that removes [Deleted Users] from the User Table.
checks for deleted flag > 0 , banned flag < and comment and discussion count < 1
everything works fine. However the one gotcha, if a user has been deleted with the blank the content option.
there will be orphan records.
A ) I could check for that in discussions, comments, and activity, and conversations and remove the blanked comment as if it were a total delete OR
B ) leave the [Delete User] if there is blanked comment
Q2 - which way would be best (A or B ).
Q3 - if there is a plugin that has its own table with userids and the user is deleted, it will leave orphans, (which may be the case anyway with the delete content process)
So the big question would it be worth writing an orphan finder and would it have any value?
feedback will determine if I proceed, since it is just a game and I have no need for the plugin myself.
btw I think the conversations table has the most orphans - since conversations are stored forever, even when everyone in the conversation has deleted them. Probably the edit log behaves this way as well if a user is deleted (haven't checked on that).
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Comments
1) You can't be expected to make tools that work in every case. Explain why it acts the way it does.
2) A
3) Plugins have to keep track of their own content. They should be hooking into the appropriate model and removing records when appropriate. (Note that I am not even sure I follow this all the time).
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
if the tables are efficiently indexed and queried, removing or leaving the 99980 "deleted" records in the table could and should have very little effect on the query performance.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
are they?
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
i said if...
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
I see what you said and I said
are they?
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
my confidence is a bit shattered ATM, so i'll decline to hypothesize on the quality or efficiency of anything right now.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained