
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2018 10:41 AM
Does anyone have a shortcut/quick and easy way to purge a table in CMDB? I am trying to purge cmdb_ci_computer (in a non-Production instance) and it is hitting a timeout if I do it from the front-end.
I have tried:
- Deleting all records in the table through a background script. Result: Ran for over an hour before I cancelled it and deleted only a handful.
- Deleting records from the list view. Result: Timed out, deleted only a few
- Deleting records from the table definition (using the Delete all records) button. Result: Timed out, deleted only a few
I think the problem is that we have a number of linked records on every computer record (installed software, hard disk(s), network adapters), and the cascade deletion is taking forever.
Any help would be most appreciated.
Thanks,
Todd
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2018 10:54 AM
The reason this is happening is due to something called:
Transaction quotas
The best practice to delete large number of records in a table is using a scheduled job, or deleting small chunks of records at a time.
Scheduled job is the best method as transaction quotas don't apply to this as it does the job in the background and does the job over a period of time.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2018 10:53 AM
I would go for a Background script. Even if the scripts takes, time, dont cancel the transaction. It keeps deleting the records in background. Keep refreshing the computer table and check the count after running the background script
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2018 10:54 AM
The reason this is happening is due to something called:
Transaction quotas
The best practice to delete large number of records in a table is using a scheduled job, or deleting small chunks of records at a time.
Scheduled job is the best method as transaction quotas don't apply to this as it does the job in the background and does the job over a period of time.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2018 11:43 AM
Thanks, I elected to go with the Scheduled Job option as suggested. It's getting through it slowly.