DEV Community

Wellfotech Engineering
Wellfotech Engineering

Posted on Originally published at wellfotech.com

How to Cut Microsoft Dataverse Database Storage Costs ($40/GB Overage Fix)

Microsoft charges $40 per GB/month for Dataverse Database overages—blocking solution deployments and inflating Enterprise Agreement renewals. Here is how to reclaim 40% to 75% of bloated capacity without deleting customer deals.

1. What Silently Eats Dataverse Database Capacity

Open Power Platform Admin Center → Resources → Capacity → Summary and check your largest environment. Customer contacts rarely fill your database—these five silent offenders do:

Table / Index Storage Tier Root Cause Fix Safety
AsyncOperationBase Database ($40/GB) Completed workflows left unpurged Safe Bulk Delete
PluginTraceLogBase Database ($40/GB) Trace setting left on "All" Switch to Exception Only
EmailBase HTML Bodies Database ($40/GB) Base64 inline images tracked inside emails Archive & Strip Old Threads
DataverseSearch Index Database ($40/GB) Too many multiline text columns indexed Trim Searchable Columns
AnnotationBase / Files File ($2/GB) Large PDFs & drawings attached to Notes Offload to Azure Blob

2. Three Quick-Win Admin Cleanups (Zero Code)

  1. Switch Plugin Trace Settings: Set Enable logging to plug-in trace log from All to Exception and schedule weekly bulk deletion for traces > 14 days.
  2. Auto-Delete Completed Workflow Jobs: Enable Automatically delete completed workflow jobs on system/custom workflows, plus bulk-delete historical Succeeded async operations > 90 days.
  3. Prune Retired Audit Partitions: Archive old quarterly Audit Partitions to Azure Data Lake or Parquet before deleting obsolete partitions via Admin Center.

3. Automated C# Attachment Offload to Azure Blob ($0.02/GB vs $40/GB)

Moving Note attachments and tracked Email PDFs into your own encrypted Azure Storage Account requires zero UX disruption when built via a PreOperation Dataverse plugin + Fluent UI v9 PCF upload/preview control:

// Intercept Note/Attachment create before binary commits into Dataverse storage
if (target.Contains("documentbody") && target["documentbody"] is string base64Payload)
{
    var bytes = Convert.FromBase64String(base64Payload);
    if (bytes.Length > 256_000) // Offload files > 250 KB directly to private Azure Blob container
    {
        var blobUri = _blobClient.UploadEncrypted(tenantOrgId, target.Id, fileName, bytes);
        target["wf_externalbloburl"] = blobUri;
        target["documentbody"] = null; // Prevent bloated write inside Dataverse
    }
}
Enter fullscreen mode Exit fullscreen mode

4. Real CFO Math: Reclaiming 80 GB

  • Before Optimization: 80 GB × $40/GB/mo = $3,200/month ($38,400/year recurring).
  • After Cleanup + Azure Blob Offload: Underlying Azure Blob storage costs ~$4/month—a net Year-1 savings over $30,000 even after one-time engineering.

Originally published at Wellfotech Engineering Blog.

Paying thousands/year in Dataverse capacity overages? Book a fixed-scope 1-Week Dataverse Storage Reduction Sprint: wellfotech.com/#contact (sales@wellfotech.com).

Top comments (0)