What is DocumentId in ReportInstance table
Can you explain what the DocumentId column is used for?
As a test, I've run/edited different reports and always found DocumentId to be equal to zero. What are the different use-cases that would make DocumentId a different number other than zero?
Also, I have set 'Version History' to 'Current Version Only' for the Incident Management Content Folder, but DB entries where DocumentId = 0 in ReportInstance are still being created whenever related reports are being run. Copying, editing and then publishing incident management reports do not create any records in the ReportInstance table, however. It only happens when reports are run.
While I am aware that the table can be maintained by manually deleting those entries, is there a way to automatically maintain the ReportInstances table?
Finally, how should I go about deleting over 65 million records from the ReportInstance table efficiently? The concern is the SQL query might take a long time. Is there a more efficient way of maintaining this table Eg. By Date Range?