Database size is increasing while removing data from the table cmdb_rel_ci
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2025 09:56 PM - edited ‎02-26-2025 10:07 PM
"We are supposed to delete 10 lakh records per day (since we have 10Cr+ unwanted data) from the cmdb_rel_ci table, but this is generating a large number of entries in sys_audit_relation, sys_audit, and sys_audit_delete tables approximately 3 times the count of deleted records. Specifically, deleting a single record from cmdb_rel_ci results in 2 entries in sys_audit_relation, 1 entry in sys_audit, and 1 entry in sys_audit_delete. How can we optimize or prevent this excessive logging while performing deletions?"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2025 02:55 AM
As the count is big, and the above solutions are not working better log a now support case, and the team can give you a more optimal solution.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2025 06:23 PM
@madhanrajesh if the audit is not needed please disable BR on cmdb_rel_ci 'Audit Relationship Changes' to stop populating sys_audit table. Regarding other two tables please reach to support which can analyze use case and provide the instructions on how to disable populating those tables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2025 10:30 PM
hi sandeep
thanks for helping.,
we tried with,
- Used gr.setWorkflow(false);
- Used gr.autoSysFields(false);
- Disabled the "Audit Relationship Changes" Business Rule on cmdb_rel_ci
- Cleared cache
However, we are still facing the same issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2025 08:47 AM
Audit Relationship change will only help with not writing deletes to the sys_audit table, there are other properties that could be tweaked to stop writing to sys_audit_delete and sys_audit_relation table. Support should be equipped to provide those.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2025 03:53 AM - edited ‎03-03-2025 03:53 AM
Still, it's logging into the sys audit tables, any idea? @Sandeep90