For immediate workflow restoration, you need to address the table locks first, then implement proper archiving. Here’s the complete solution:
Database Storage Monitoring:
Set up automated alerts in Admin Center before you hit capacity. Navigate to System Settings > Database Monitoring and configure alerts at 75%, 85%, and 90% thresholds. Enable daily growth tracking to predict when you’ll hit limits. This gives you proactive warning instead of emergency firefighting.
Table Lock Troubleshooting:
Your lock timeouts are caused by missing indexes on the compliance_records table. Add these indexes immediately:
CREATE INDEX idx_approval_status ON compliance_records(approval_status, document_id);
CREATE INDEX idx_created_date ON compliance_records(created_date);
CREATE INDEX idx_record_status ON compliance_records(record_status, last_modified);
These indexes will eliminate full table scans during approval workflows. Your UPDATE operations will find target records instantly instead of locking the entire table.
Archiving and Retention Policies:
Go to Compliance Module > Configuration > Retention Policies. Create a tiered retention strategy:
- Active records (0-2 years): Live database, full indexing
- Recent archive (2-5 years): Archive tables with read-only access
- Long-term archive (5+ years): Compressed storage with audit trail intact
Configure automatic archiving rules:
AUTO_ARCHIVE_AGE=730 -- days (2 years)
ARCHIVE_BATCH_SIZE=1000
ARCHIVE_SCHEDULE=WEEKLY_SUNDAY_02:00
Maintaining Audit Traceability:
Critical - when archiving, preserve the complete audit chain. The archive process must maintain:
- Original timestamps and electronic signatures
- Full approval history with user IDs
- Document version links and change records
- Regulatory compliance metadata
Test your archiving process on a small batch first. Verify that archived records are retrievable through the Compliance module’s search interface with full audit trail visible. Once confirmed, run the bulk archive for records older than 2 years.
For your immediate Monday deadline: Apply the indexes tonight (takes 15-30 minutes), which will resolve the approval workflow blocks. Then schedule the archiving process for this weekend to bring your capacity back under 70%.