Anonymised case studies from real engagements. These are production databases — the problems were real, the fixes were measurable, and the impact was immediate.
A B2B SaaS company's core reporting feature was so slow that customers had stopped using it. Within one week, every query was under 200ms.
The company's SaaS platform had a core reporting module that generated custom usage dashboards for each of their enterprise customers. As their data grew past 50 million rows, the dashboards became unusably slow — sometimes taking 18–25 seconds to load.
They'd tried adding RAM to their RDS instance and switching to a more powerful instance class. Neither helped. Their engineering team didn't have a DBA with deep PostgreSQL expertise, and they were starting to lose enterprise customers who complained about the reporting UX.
They contacted us after reading a blog post about PostgreSQL slow query diagnosis. The initial audit uncovered the core issue within 2 hours of getting access.
tenant_id and created_at, but the index only covered tenant_id. PostgreSQL was loading 50M rows into memory then filtering.We created a composite index on (tenant_id, created_at DESC) and a partial index on (tenant_id, created_at) WHERE status = 'active'. This immediately eliminated the sequential scans.
We tuned autovacuum_vacuum_scale_factor and autovacuum_analyze_scale_factor for the high-churn tables, then ran a manual VACUUM ANALYZE to clear the bloat immediately.
We worked with their engineering team to collapse the 12 separate dashboard queries into 2 using CTEs and window functions — eliminating the N+1 completely.
Worst-case query time dropped from 18.4 seconds to 190ms — a 94% reduction. Average dashboard load time fell from 12 seconds to under 800ms.
The customer who had been most vocal about leaving renewed their contract the following month. The engineering team said this was the single biggest UX improvement they'd shipped in 18 months — without writing a line of new application code.
As an ongoing benefit: CPU utilisation on their RDS instance dropped 40%, which let them downsize the instance class and reduce their monthly AWS spend.
A fast-growing e-commerce company had an AWS RDS bill that had grown rapidly. After a two-week optimisation engagement, the same workload ran at a much lower monthly cost — delivering major annual savings.
This mid-size e-commerce business had grown rapidly during a period of high online retail growth, and their AWS bill had scaled with them — but inefficiently. Their monthly RDS spend had ballooned across a multi-AZ instance, multiple read replicas, and heavy storage I/O costs.
Their CTO reached out after the board flagged the AWS bill in a quarterly review. They suspected they were over-provisioned but couldn't confidently downsize without risking performance degradation during peak sale periods.
After adding the missing indexes and fixing the worst-performing queries, CPU utilisation dropped to 4–5% on the existing instance. This gave us the confidence to downsize — we moved to a db.r5.xlarge (32GB RAM), which handled the workload comfortably with 25% headroom at peak.
We decommissioned the two unused read replicas and updated the application's database connection configuration to properly distribute read traffic across all replicas.
We switched from provisioned IOPS to gp3 storage, which provided better baseline performance at a fraction of the cost. We also reduced binlog retention to 1 day, reclaiming the wasted storage.
Monthly RDS spend dropped by 62%. The changes were rolled out over two maintenance windows with zero downtime and no performance regressions.
As a bonus, query response times on the product search feature improved by 65% due to the missing indexes — a performance improvement the business hadn't even asked for.
The engagement paid for itself within the first month of savings. The CTO went back to the board with a clear annual savings figure and a written report explaining the technical changes.
Start with a free 30-minute assessment call. We'll ask about your setup, identify your biggest risks and opportunities, and provide three actionable recommendations — regardless of whether you hire us.
Book Your Free Assessment