Cleaning up BSI Document Repository

Document ID : KB000077060
Last Modified Date : 11/04/2018
Show Technical Document Details
Question:
How can the Business Service Insight Document Repository be cleaned up? If it gets too full, it can become so slow to display that it times out.
 
Answer:
To clean up these in the database, you'll need to archive a few of the rows of the table T_DOCUMENT_REPOSITORY; there were too many for a prompt response.

To delete the entries, we need to remove them from the following tables. For example taking the ID range of under 1000:

delete from t_rpt_usr_group_permissions u where u.report_id in ( select g.report_id from t_report_galleries g where g.document_id < '1000') ;
delete from t_report_galleries where document_id < '1000';
delete from t_document_repository where document_id < '1000';

You'll just need to amend those where clauses to reflect the actual IDs you need to scrub.