We help companies whose product runs on PostgreSQL, Oracle, SQL Server or MySQL find and fix the schema, query, configuration and recovery problems behind slow pages, rising bills and repeat incidents. We diagnose with read-only access, make the fixes on the database you already run, and stay on with ongoing support after they ship.
30 minutes with DharmOps. Or describe the problem and an engineer replies within 24 hours.
database-engineering
Slow query found
EXPLAIN ANALYZE on the real query
Index added
Fix tested before it ships
Replica in sync
Failover rehearsed
Restore verified
Backups proven, not assumed
Does This Sound Like Your Database?
Most teams don't call us because of a database. They call because something the business depends on has stopped working the way it used to. These are the situations we hear most often.
Pages and reports have slowed down, and CPU sits near 100%
Queries that used to return in milliseconds now take seconds, reports time out, and the usual fixes (adding an index, adding a replica, buying a bigger instance) helped for a few weeks and then stopped helping. The cause is usually a query plan, a missing composite index, table bloat or a configuration default that was never changed as the data grew.
Connections run out on Monday mornings. Disk fills overnight. A failover that should take seconds takes fifteen minutes. Each time the team restarts something and the alert clears, but nobody has found the reason it happened.
The instance has been resized twice, storage and I/O charges keep climbing, and nobody can say which queries are driving the cost. Often the database is paying for full table scans and dead rows, not for customers.
Lock waits, replication lag and "too many connections" errors appear at peak traffic. The design that worked at 10 GB doesn't work at 300 GB, and every new feature makes it worse.
The person who knew the database has left
The schema, the backup scripts and the failover setup were built by one person. Now nobody is sure the backups restore, why a setting was changed, or what will break during the next upgrade.
A forced upgrade is coming
Amazon RDS for MySQL 8.0 left standard support on July 31, 2026, and RDS now bills Extended Support per vCPU-hour on top of the instance cost. SQL Server 2016 reached end of support on July 14, 2026. Upgrading a production database without a rehearsal and a rollback plan is how outages start.
Connections run out, queries queue up and transactions slow down. A bigger instance buys a few weeks, but the connection pool and the queries holding connections open are still sized for last year's traffic.
Replicas can't keep up with production writes, so reads return stale data and a failover would lose whatever hadn't arrived yet. The usual causes are write volume, long-running transactions or a replica undersized for the work sent to it.
Nobody knows if recovery would work
Backups run every night, but nobody has restored one recently, so nobody knows whether recovery would meet the RTO and RPO the business assumes. The first real test shouldn't be the outage.
A migration that ran in seconds on staging locks a large table in production, or a deployment ships a change the application isn't ready for. The team starts saving changes for late-night windows, which makes each one riskier.
Nobody is sure who can access what
Too many people and services have privileged access, and nobody can say what each role is for. Removing anything feels risky, so permissions only ever grow.
Customers find problems before your alerts do
Monitoring covers CPU and disk, but not the slow queries and query regressions users actually feel. By the time an alert fires, the support tickets have already arrived.
If one of these describes your week, the next step is a 30-minute call.
Database engineering is the work of designing, fixing and changing the production database your application runs on, so it handles today's load and next year's at a sensible cost.
In practice, that means we work on:
Queries: reading execution plans (the database's step-by-step method for answering a query) and rewriting the queries and ORM patterns that waste work.
Schema and indexes: table design, keys, partitioning, and indexes that match how your queries actually filter and sort.
Configuration: memory, connection, vacuum and checkpoint settings tuned to your hardware and workload instead of the defaults.
Replication and high availability: replicas, failover and connection pooling that still work when a node goes down.
Backup and recovery: backups you have restored at least once, with a known recovery time (RTO) and a known amount of data you could lose (RPO).
Upgrades and migrations: version upgrades and engine moves, such as Oracle to PostgreSQL, rehearsed before the cutover.
Access: roles and permissions so each person and service has only what it needs, and audit logging that keeps working through a migration.
What It Isn't
Database engineering is not data pipelines, ETL or the data warehouse; that work belongs to our Data Engineering service. It is also not routine day-to-day administration such as patching, scheduled backups or creating user accounts.
Engines We Work On
PostgreSQL, Oracle and SQL Server, where our published case studies come from, plus MySQL, MariaDB, MongoDB and Redis. Self-hosted or managed: Amazon RDS and Aurora, Azure SQL and Google Cloud SQL.
When a database slows down, the first instinct is often to move to a different engine or a larger server. In most cases we see, the problem is the schema, the queries or the configuration, and it moves with you. The 340GB PostgreSQL database in our case study went from 4 minutes to 17 seconds on the same 32 GB server, without new hardware.
What Changes After the Work
Each of these comes from a completed engagement, measured against the baseline we recorded before making any change.
Outcomes from DharmOps database engineering engagements and why they matter
What changes
What it looked like
Why it matters to you
Your product gets faster
Primary report: 4 min → 17 s (340GB PostgreSQL). Finance reports: 3+ hours → 15 min average (Oracle ERP). Financial report: 45 s → 4 s (fintech). Dashboard: 8 s → 200 ms (B2B SaaS).
Users stop waiting, reports finish, and your team starts asking questions it had given up on.
The same hardware carries more load
60% less disk I/O at peak reporting hours; 48 GB of dead-row bloat reclaimed.
You put off the next instance upgrade, and spikes stop slowing unrelated queries.
Changes ship without taking the product down
Zero downtime across all four published cases, including an Oracle to PostgreSQL migration with 0 records lost.
Schema changes and upgrades stop being something the team schedules for 2 a.m. and dreads.
Recovery is tested, not assumed
Restore drills and failover rehearsals with written runbooks.
When something does fail, the team follows a procedure it has already run once.
The knowledge stays with your team
Every change versioned in your repository; runbooks and architecture notes in your accounts.
You are not dependent on one person, including us.
What We Work On, and What You Receive
Performance
Query plan analysis, index design, configuration tuning, bloat and vacuum fixes, connection pooling.
You receive: a baseline report, a query bottleneck and wait-event analysis, a ranked list of fixes, and before/after measurements on the same metrics.
Why it matters: you can see exactly what changed and by how much, rather than taking "it feels faster" on trust.
See what this covers
Lock contention analysis
Wait-event analysis
Transaction and concurrency optimization
High-volume workload optimization
Database connection saturation analysis
Peak-load validation at production data volume
Memory and disk I/O bottleneck analysis
Engine-specific performance tuning
Architecture and schema
Data model review, partitioning, read/write separation, design for the next stage of growth.
You receive: a reviewed design and scaling recommendations with the trade-offs written down, and schema changes delivered as versioned migrations.
Why it matters: future developers can see why the database is built the way it is, and changes go through your normal review.
See what this covers
Advanced partitioning strategies
Connection pooler and proxy setup, such as PgBouncer
PostgreSQL extension implementation
Reliability and recovery
Replication and failover setup, backup design, RTO and RPO targets.
You receive: a failover test result, a tested restore, and runbooks for both.
Why it matters: you know how long recovery takes and how much data is at risk before you need to find out.
Version upgrades (for example MySQL 8.0 to 8.4, SQL Server 2016 to a supported release) and engine moves (Oracle to PostgreSQL).
You receive: an inventory of everything that has to move, a rehearsal plan, rehearsal results, a data consistency report, and a cutover plan with a rollback.
Why it matters: the cutover is the fourth time the team has done it, not the first.
See what this covers
CDC-based database migration
Zero and low-downtime migration
Replication-based migration
Migration data consistency validation
Migration cutover validation
Rehearsed rollback and recovery procedures
Release engineering
Safe online schema changes
Migration testing with equivalence checks
Deployment validation in staging at production volume
Health checks against the baseline, alert review, capacity and upgrade planning, schema and query review for new features, help during business hours, and on-call incident response if it's part of your support plan.
You receive: regular health reports, query monitoring with alerts configured, an upgrade and capacity plan kept current, and the same engineer who did the original work.
Why it matters: problems are found while they are still small, and you never have to explain your database to a stranger during an incident.
See what this covers
Monitoring and observability
Query latency monitoring
Slow-query detection
Autovacuum and table-bloat monitoring
Database alert configuration
Prometheus and Grafana monitoring with postgres_exporter and mysqld_exporter
Included and Not Included
What the Database Engineering service includes and excludes
Included
Not included
Transactional databases: PostgreSQL, Oracle, SQL Server, MySQL/MariaDB, MongoDB, Redis, and their managed cloud versions
Data pipelines, ETL, warehouses and lakehouses (Data Engineering)
Partitioning and connection pooling to scale on the same hardware
CDC-based and low-downtime migrations
Query monitoring and alerting
Online schema changes, validated in staging at production volume
Database-specific incident troubleshooting
Everything in the agreed written scope
Anything new, which is added to the scope in writing first
What We Need From You
01A technical owner and a decision-maker. Someone who knows the system and someone who can approve changes. Sometimes the same person.
02A read-only monitoring role, with query statistics turned on. On PostgreSQL that means pg_stat_statements and a role with pg_monitor, not a superuser.
03Read access to the database's cloud metrics and billing.
04A staging environment, or approval for us to create one.
05Agreed change windows and an approval path for anything that writes to production.
06Access to the repository that holds your schema and migrations.
07Any compliance rules that affect access, such as HIPAA, PCI DSS, SOC 2 or GDPR, so we can set access up correctly from the first day.
How an Engagement Works
There are six stages, and you approve each one before the next starts. Nothing in your production database changes until you've seen the evidence and agreed to the change.
Discovery call
Diagnose
Prioritize
Fix
Stay
Discovery call
You describe the symptom, the engines you run and what you've already tried. We tell you whether it looks like a database problem and what a diagnostic would examine. If the fix is small enough for your team, or we're not the right team, we tell you on the call.
You receive: a written summary within 24 hours of the call: what we heard, what the diagnostic would cover, and what access it needs
You provide: the symptom, rough data size, engine versions and where the database runs
Approval: you decide whether to go ahead with the diagnostic. No access is requested at this stage
30 minutes · scheduled on our booking page
Diagnostic
We sign an NDA, then work with read-only access to metrics, logs and query statistics. We record a baseline (query times, CPU, disk I/O, waits, bloat, connection use), trace each symptom to its cause, and write the report.
You receive, on the last day: the diagnostic report with the baseline numbers, every finding with its evidence, fixes ranked by impact and effort with the risk and rollback for each, and a proposed order of work with milestones
You provide: a named technical contact, a read-only database role, query statistics turned on (on PostgreSQL, pg_stat_statements, which needs a restart if it isn't already loaded) and read access to the database's cloud metrics
Approval: you approve the access level before it's created. Nothing is changed in your database during this stage
Usually 3–4 working days, report included · starts within 3 business days of the NDA being signed and read-only access being approved
Review and agree the plan
We walk you through the report, answer questions on each finding, and turn the fixes you choose into a written scope.
You receive: the written scope for the fix stage
You decide: which fixes go ahead and in what order, what your team will do itself, and when change windows are
Approval: the scope is agreed in writing before any change. Work outside it is added in writing first
A review meeting with your engineering and business leads, held when the report is delivered (or the next business day if your leads aren't available)
Fix
Each change is tested on staging at production volume first and ships with a rollback. Indexes are built without locking tables. Structural changes run old and new versions side by side until the switch is confirmed. Migrations are rehearsed in full against a copy of production before the cutover.
You receive: every change as a reviewed, versioned commit in your repository, and progress updates in a shared Slack or Teams channel
You provide: a staging environment (or approval for us to create one), repository access, and a person who approves production changes
Approval: each production change is approved by you before it's applied
Applied in the change windows you agreed
Verify and document
We measure the same metrics as the baseline, on production, and compare them.
You receive: the before/after results in writing, runbooks (recovery, failover, upgrade) and architecture notes in your accounts, and a walkthrough for your team
Approval: you review the results against the baseline from the diagnostic
Straight after the last change
Ongoing support
Business hours: health checks against the baseline, alert review, upgrade and capacity planning, and review of schema and query changes for new features. Outside business hours: on-call incident response, if it's part of your support plan.
You receive: regular health reports and a current upgrade and capacity plan
You provide: monitoring access, and notice of upcoming launches or traffic changes
Approval: changes still follow the same rule: tested, reversible and approved by you
Continues after the fix, with the same engineer
Ongoing Support Response Times
First response times for ongoing support by severity
Severity
Example
First response
Critical
Production database down, data at risk
Within 30 minutes
High
Severe slowdown, failing jobs, replication broken
Within 2 hours
Normal
Questions, planned changes, reviews
Next business day
Response times apply during the hours in your written scope. On-call is an option within ongoing support, scoped and priced separately. These are response times, not repair times.
What We Commit To, and What We Estimate
We commit to
A 30-minute discovery call with DharmOps
A written call summary within 24 hours
An NDA before any access
Diagnostic starts within 3 business days of the NDA and read-only access
Diagnostic report delivered on the last day of the diagnostic
Read-only access first; nothing changed during diagnosis
A written plan and agreed scope before any change
A rollback for every production change, applied only with your approval
Before/after results measured against the same baseline
The same engineer from diagnostic to ongoing support
Critical incidents: first response within 30 minutes, during the hours in your written scope
We estimate (and explain the estimate)
How long the diagnostic takes (usually 3–4 working days)
How long the fixes will take
Migration timelines, which depend on how many rehearsals are needed
The improvement each fix is expected to deliver
Estimates are given in writing in the diagnostic report and the agreed scope, and updated in the shared channel if anything changes them.
What Affects the Timeline
Access: how quickly the read-only role and metrics access are approved on your side.
Query statistics: whether they're already on. Turning them on can need a restart in a maintenance window.
Staging: whether a staging environment with production-sized data exists, or needs to be built.
Change windows: how often production changes are allowed.
Approvals: how many people sign off a production change.
Scope: the number of databases, engines and environments involved.
An operations platform's main report took 3–4 minutes and often timed out. Disk I/O was saturated and storage kept growing without new data.
Cause found
shared_buffers at the 128 MB default on a 32 GB server, autovacuum letting 48 GB of dead rows build up, an index on status alone while the report also filtered by date, and work_mem at 4 MB, so every sort spilled to disk.
What we changed
Memory settings tuned, autovacuum fixed per table and 48 GB reclaimed, a covering partial index on (created_at, status) built without locking, and the 180-million-row events table partitioned by month.
Result
4 min → 17 s (14x), 60% less disk I/O at peak, zero downtime, no application code changes, 4 working days. Support continued after the fix.
"We were running performance issues on a PostgreSQL database with over 300GB of data. DharmOps analysed the workload, found the bottlenecks, and handled the tuning at a scale that required genuine expertise. The scope of what they delivered at that data volume exceeded what we expected going in."
A manufacturer's end-of-day finance reports ran 3+ hours, and Oracle Forms screens timed out during busy periods, blocking order entry.
Cause found
Using AWR and ADDM: full table scans on multi-million-row tables, PL/SQL packages processing one row at a time, missing function-based indexes, an undersized Shared Pool, and no precomputed aggregates.
What we changed
14 report packages rewritten to bulk processing, the missing indexes added, memory resized, and materialized views for the heaviest financial datasets.
Result
3+ hours → 15 min average, Forms 8x faster with timeouts gone, zero production downtime.
Oracle licensing and an ageing platform, with 120+ PL/SQL packages and 30+ scheduled jobs the business depended on.
What we did
Inventoried every package and job, converted them, moved the jobs to pg_cron, and ran three full rehearsal migrations using logical replication before the cutover.
Result
0 records lost, zero downtime, Oracle licensing removed.
A city traffic platform running PostgreSQL and SQL Server
Situation
Sensor ingestion slowed down and peak-hour reports timed out on an 800-million-row dataset split across two engines.
What we did
Partitioned the largest tables, added BRIN indexes for time-ordered data, put PgBouncer in front of PostgreSQL, and used Query Store and change data capture on SQL Server.
Result
Faster ingestion and peak reports that finish, with zero downtime.
"Our PostgreSQL queries were slowing down as our dataset grew. We'd already tried the obvious fixes ourselves. DharmOps got into our query plans, identified the root cause quickly, and tuned what mattered. The kind of deep database knowledge you can't easily find elsewhere."
One team from diagnosis to ongoing support.The engineer who found the problem fixes it and stays on. No handoff to a separate support desk.
Several engines, one team.If you run PostgreSQL next to SQL Server or Oracle, one team covers both.
Fix before you switch.We look for the design problem first, because a new engine won't fix a bad query.
Read-only first.Diagnosis starts without write access to anything.
You own everything.Changes live in your repository, documents in your accounts. If you stop working with us, nothing stops working.
How We Handle Your Data and Access
Giving an outside team access to a production database is a serious decision. These are the rules we work by.
NDA before any access. Signed before we see anything.
Read-only first. Diagnosis uses metrics, logs and query statistics through a read-only role.
Least access. We ask only for what the current step needs, and access is removed when the work ends.
Approval before access. You approve each access level, and it is reviewed on a schedule.
Your data stays where it lives. We work inside your environment. Any copy needs a documented reason, is encrypted and is logged.
Deletion we verify. When work ends, anything we held is deleted, and the deletion is confirmed and logged.
Written incident procedure. If something goes wrong, there is a documented process, not improvisation.
An engineer makes every decision. We use AI tools for log triage and drafting documentation. Every root cause, change and recommendation is made and signed off by an engineer.
Frequently Asked Questions
How do we know the problem is actually in the database?
You don't need to know before you call. Slow APIs and timeouts are often blamed on the database when the time is really spent in application code, the network or an external service. The diagnostic measures where the time goes. If it's outside the database, the report says so and shows the evidence, so you don't pay for fixes in the wrong place. Slow API? It might not be the database
We've already tried tuning it ourselves. What will you do differently?
We start from measurements, not from the usual checklist. Most teams have already added indexes, added a replica or moved to a bigger instance. We look at the query plans, wait events, bloat and configuration together, because the cause is often several small problems making each other worse. In the 340GB case, four separate causes, none visible in the application logs, added up to a 4-minute report.
Should we fix our database or move to a different one?
In most cases, fix it first. Slow queries, a poor schema and default configuration move with you to a new engine, and the migration adds risk and months of work. Switching makes sense when something outside performance forces it: licensing cost, a feature the engine can't support, or the end of vendor support. In that case the move should be rehearsed in full before the cutover, as in our Oracle to PostgreSQL migration.
We're on Amazon RDS, Aurora or Azure SQL with no server access. Can you still help?
Yes. Managed databases hide the operating system, but most performance and reliability work happens through what they do expose: parameter groups and configuration, query statistics, Performance Insights or Query Store, replicas and failover settings, and instance sizing. AWS RDS performance tuning
What if a change doesn't improve things?
It gets rolled back. Every change is tested on staging first, ships with a rollback, and is measured against the baseline after it's applied. If a change doesn't move the metric it was meant to move, we reverse it and say so in the results. You see the before/after numbers for every change, not a summary.
Will you work with our engineers, or replace them?
We work with them. Your team approves every production change, sees the reasoning in the shared channel, and gets the runbooks and a walkthrough as each change ships. Many clients keep their own engineers on day-to-day work and use us for diagnosis, the harder changes and on-call cover.
How is the work priced?
Each stage is priced separately, and you see the price before agreeing to it. The diagnostic is quoted after the discovery call. The fixes are quoted in the written scope, after you've seen the report. Ongoing support is a monthly retainer. What affects the price: how many databases and engines you run, the data size, how urgent the work is, and the support hours you need, including on-call if you want it. Cost-reduction work is usually planned so the savings help pay for the fixes.
Are we tied into a long contract?
No. The diagnostic, the fixes and ongoing support are separate stages, and you decide at each one whether to continue. Ongoing support runs month to month, and either side can end it with 30 days' notice. Everything we produce lives in your repository and accounts, so stopping doesn't leave you dependent on us.
Do you work in our time zone?
Yes. Business-hours support runs in your time zone, wherever you are. During the hours in your written scope, critical incidents get a first response within 30 minutes. On-call outside those hours is an option within ongoing support, scoped and priced separately.
Can you work within HIPAA, PCI DSS or SOC 2 requirements?
We work inside your environment, under your access controls, with least-privilege roles, logged access and verified deletion when the work ends. Tell us your requirements on the discovery call and we'll set up access to match them from day one. We support your compliance work; we don't run the audit. Access control and audit logging for SOC 2, HIPAA and GDPR
Database Engineering Use Cases by Industry
A slow or fragile database costs different things in different industries: a missed report deadline, a failed recovery, a checkout that stalls at peak. The cause is usually in the queries, the configuration or the recovery plan.
Database Engineering for Banking & Insurance
Moving off Oracle for licensing cost is a large project. We fix the design problems first so they don't move with you, and rehearse the migration in full against a copy of production before the cutover.
Database Engineering for Healthcare
Clinical and claims systems can't afford an untested recovery. We rehearse failover and test restores, and write the runbooks, so recovery doesn't depend on someone remembering the steps.
Database Engineering for Retail & eCommerce
A product page or checkout that slows at peak usually traces to a query plan or a connection limit, not the size of the server. We measure it and fix the cause before adding hardware.
Database Engineering for SaaS & Software
Dashboards that were fast at launch slow down as customer data grows. We find the query and index causes, and every change lands in your repository for your engineers to review.
Database Engineering for Manufacturing
End-of-day reports that run for hours can block order entry. We trace the heaviest reports to their queries and processing logic, and fix them without changing what the report shows.
Database Engineering for Logistics
Shipment and fleet data arrives in constant high-volume writes. We tune ingestion and keep peak-hour reports finishing, with the work tested before it reaches production.
"…We had a PostgreSQL function requirement that needed real database knowledge to implement well. They delivered a clean, working solution without any back-and-forth."