Your hybrid reporting performance issue is a common challenge when implementing external archival solutions. The problem stems from the fundamental difference in query performance between local database operations and external API calls to cloud storage. Let me walk you through a comprehensive solution that addresses all three critical components.
AUTOMATED ARCHIVAL PROCESS:
Your current archival process needs to be enhanced to support efficient hybrid reporting. Modify your archival workflow to execute a two-phase commit:
Phase 1 - Metadata Extraction: Before moving case data to Azure Blob Storage, extract and persist reporting-critical fields to a local metadata repository. Create a new CDT called ‘ArchivedCaseMetadata’ with these fields:
- caseId (primary key)
- caseNumber, caseTitle, caseType
- createdDate, closedDate, archivedDate
- assignedUser, department, priority
- finalStatus, resolution
- blobStorageUri (reference to Azure location)
- documentCount, totalSize
Phase 2 - Archive Transfer: After metadata is safely persisted locally, proceed with the full case transfer to Azure. This ensures your reporting layer always has fast access to summary data even if the Azure call fails or is slow.
Update your archival smart service to include a metadata write step before the external transfer. This adds minimal overhead to the archival process while dramatically improving query performance.
EXTERNAL STORAGE INTEGRATION:
The integration pattern needs to support both query-time and background sync operations:
-
Implement a metadata synchronization service that runs nightly to verify consistency between your local metadata store and Azure Blob Storage. This catches any archival failures or data drift.
-
Create a connected system for Azure Blob Storage with connection pooling and timeout configurations:
- Set connection timeout to 5 seconds
- Set read timeout to 15 seconds
- Configure retry logic with exponential backoff
- Enable connection pooling with min 2, max 10 connections
-
Build an integration object that provides two access patterns:
- Fast path: Query metadata from local data store (sub-second response)
- Detail path: Fetch full case from Azure only when explicitly requested (lazy loading)
HYBRID REPORTING CONFIGURATION:
Restructure your reports to use a three-tier query strategy:
Tier 1 - Active Cases: Query your primary case management data store for all active and recently closed cases (last 90 days). This is your fast path with typical database performance.
Tier 2 - Archived Metadata: Query the ArchivedCaseMetadata data store for summary information about archived cases. This provides aggregate counts, date ranges, and basic metrics without touching Azure.
Tier 3 - Archived Details: Only query Azure Blob Storage when a user drills down into a specific archived case. Implement this as an on-demand action rather than automatic loading.
In your report grid configuration:
- Display Tier 1 and Tier 2 data by default (merged result set)
- Add a conditional column showing ‘View Details’ link for archived cases
- When clicked, make an async call to fetch full case data from Azure
- Cache retrieved archived cases in the user session for 1 hour to avoid repeated fetches
For executive dashboards showing historical trends:
- Pre-aggregate archived data monthly and store in a summary table
- Update this summary table as part of your nightly archival process
- Dashboard queries hit the summary table instead of raw archived metadata
- This provides instant trend analysis without any external storage calls
Implementation checklist:
- Create ArchivedCaseMetadata CDT and data store
- Modify archival process to write metadata before transfer
- Update all existing reports to query the metadata store for archived cases
- Implement lazy loading for full archived case details
- Create monthly summary aggregation job for dashboard reports
- Add monitoring to track report performance metrics
This architecture reduces your report query time from 2-3 minutes back to under 10 seconds for most operations, while maintaining complete access to historical data when needed. The key is separating frequently queried metadata from rarely accessed full case details.