Quickly delete User records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 02:20 AM
After cloning, I need to preserve only the users and their permissions in Domain A.
I have tried using preserve and exclusion on three tables (user, user_has_role, grmember), but it didn't work, possibly due to my setup.
Additionally, I'm trying to use a cleanup script to delete users, but it runs too slowly. So the question is does anyone have any ideas or experience with using cleanup scripts to delete user records? Do we have any functions that can make it run quicker (e.g., setWorkflow(false) or something similar)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 04:04 AM
Please share what you did, because if you say 'it is probably due to my setup' and not share the setup, we won't be able to assist on this.
What do you mean with your cleanup script is running too slowly? What happens? What is the script? And even better: why even use a script? You already have preservers and excludes in place. Why do you need to delete records from the table you are already preserving/excluding?
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 06:44 PM
For the development instance, I applied preserve for user/ user has role and grmember table withou condition(because this instance not included any customer data) and exclusion for these table as well.
Related to cleanup script, that just a simple query to deleteMultiple and I aslo setWorkflow(false). But this script run to slow. There are 500k records and it delete 1k for 45m
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 06:55 PM
Hi @green jason
You can create a Delete Job which will be available under system data management module.
Or you can create a table cleaner job (sys_auto_flush) too. These are faster compared to background job or fix script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 08:46 PM - edited 03-03-2025 09:43 PM
Thank you for your advices, but I'm not sure how quickly the Delete Job will perform, have you have any idea?