Occasionally customer may need to delete a large number of records from a specific table and drop the table completely. Below are steps followed to remove all the records and then delete the table.
- Run a background script to delete all records from the table
- After deleing all records, navigate to table and click on 'delete' option
- When we try to 'delete' table from UI, the table will not get deleted and the transaction will be timed out and cancelled.
Release or Environment
- The delete operation is failing from frontend because its trying to delete the related records from sys_metadata_delete table and due to large data its getting timed-out.
- There will be millions of records for the table in 'sys_metadata_delete' table which have to be deleted first before dropping the table.
- Please advise the customer to delete the records of the table from 'sys_metadata_delete' first and then drop the table from the front end.
But it is always advisable to inactivate the table rather than deleting the table. Because deleting data from a table might affect other records. It is not recommended.