Clinical Communication Platform
TigerConnect Cuts Database Load on Its Heaviest Queries by 11.6x with Ravn and Claude Code
Ravn guided TigerConnect through a production-validated optimization of a care-provider lookup query that accounted for 68.5% of read time on its Postgres database, delivering the rewrite through a structured Claude Code workflow. Three weeks after deploy, the targeted read path was doing 11.6x less database work.
The Challenge
As part of an ongoing investment in platform reliability and performance visibility, TigerConnect engaged Ravn to analyze, optimize, and validate database query performance across the service. Ravn began by establishing where database time was actually being spent. Ravn analyzed a production pg_stat_statements export covering roughly 66 days of counters and 4.75 billion recorded calls. It showed that a single role-merge lookup joining care providers to patients accounted for 68.5% of tracked execution time across the top 40 queries. With writer CPU peaking around 18%, the platform had comfortable headroom. Ravn recommended scoping the work as a capacity and cost optimization, focused on making an already-stable system more efficient.
The Solution
Ravn moved transaction segmentation and quality scoring off the device and into a Claude pipeline. Claude reads the conversation and keeps a single customer interaction together across audio chunks. A second pass recovers speaker roles when the transcript is ambiguous. Speaker identity is not used for boundary decisions. Every production model call carries a full per-call cost and prompt-version audit, with cost metered against an effective-dated price book. Before the engagement, some stages were billing without that audit trail; Ravn closed those gaps. Prompt behaviour is pinned by automated golden-fixture tests across the stack.
The Outcome
Care-provider query, single-plan execution time: 12.806 ms → 0.191 ms (67.0× faster), verified by one production EXPLAIN. Targeted read-path database load (5 audited query buckets): 69.16 ms → 5.95 ms of DB time per wall-clock second (11.6× less load), measured as a 20.6-day delta, pre- vs. post-deploy. Database time reclaimed: 31.3 hours over 20.6 days (about 1h 31m per day), same window. Alarm-lookup index efficiency: 1,858 / 901 rows scanned per lookup → 1.00 rows scanned per lookup, same window. Cross-check: new index scan counts, query call-count deltas, and buffer-hit-rate deltas agreed with each other to within 0.04%.
Tech & Cloud
Claude Code, deployed within a workflow Ravn designed around a clear division of labor. Claude Opus 4.8/5 at high reasoning effort (occasionally Fable 5) handled the design work: reasoning about the rewrite and test design from the production query plans. Claude Sonnet 4.6/5 at medium effort executed against that specification. Ravn kept production benchmarking (running query plans and reading output) as a manual, engineer-owned step, so every performance claim traces back to a human-reviewed production result.
MORE WORK
Other projects we've shipped.
Ready when you are
Your next build starts here
Tell us what you're working on. We'll tell you how we'd ship it, usually within a single business day.

Built by people, for people
The team you'll actually be working with.
US BUSINESS HOURS · NEARSHORE EXECUTION · NO OVERNIGHT HANDOFFS


