At a glance
CRDB Statements Spike vs Ecom Order Rate plots CockroachDB statement throughput (statements per second) against the storefront’s order rate on a shared dual-axis chart over a rolling 15-minute window. The two should move together: more orders means more database work. The dangerous reading is divergence: a statements spike with no matching order spike. That pattern means the database is suddenly doing a lot more work that is not turning into revenue, which usually points at a runaway query loop, a misbehaving cron or backfill, a retry storm, or a bot hammering an endpoint. For a DBA or SRE team this card separates “we are busy because business is good” from “we are busy for no good reason, and it is about to cost us”.
Calculation
The card joins two per-minute rates on a shared time axis and renders them on a dual-axis chart:Worked example
A platform team runs CockroachDB behind the order and catalogue services for a retailer on BigCommerce. Normal mid-afternoon throughput is roughly 3,000 statements/sec at around 40 orders/min. Snapshot taken on 14 Apr 26 at 15:30 BST, shortly after a routine application deploy.
Orders sit steady around 40 to 43 per minute throughout, exactly normal for the time of day. Statement throughput, though, roughly triples from 3,100 to 9,100 per second starting at 15:28, minutes after the deploy. The two curves, which had been moving as one, split apart. The card raises the divergence alert: query load is up sharply and not a single extra order explains it.
What the on-call SRE does with this:
- Rule out a legitimate batch. Confirm no scheduled backfill, reindex, or reporting job is meant to be running. If one is, the engine usually attributes it; if this is unattributed, the spike is unexpected.
- Tie it to the deploy. The spike began minutes after the 15:30 release. The classic cause is an N+1 query regression: a code path that used to issue one statement per order now issues dozens. Cross-read Statements per Second (live) for the raw curve and Top Contended Statements to find which statement fingerprint exploded.
- Contain before it cascades. Extra query volume with no revenue is pure cost and a risk to everything else on the cluster. Watch Statement Latency p95 (ms) and Connection Pool Saturation %: if either is climbing, the rogue load is starting to starve real customer traffic. Roll back the deploy or feature-flag off the offending path.
- The mismatch is the alert, not the height. 9,100 statements/sec during a genuine sales peak with orders also up would be healthy scaling. The same 9,100 with flat orders is waste. Always read both axes.
- Statements-per-order is a deploy regression smoke test. When the ratio jumps after a release, suspect an N+1 or a missing cache. This card makes that ratio visible in real time.
- Wasted load is borrowed time. Query work that earns nothing still consumes connections, CPU, and latency budget. Left alone it degrades the paths that do earn, turning a code smell into an outage.
Sibling cards
Reconciling against the source
Where to look natively:
DB Console SQL dashboard (“SQL Statements” / “Queries Per Second” panels) for the live statement-throughput series the left axis is built on.
DB Console SQL Activity → Statements to see which statement fingerprints carry the load and rank them by execution count.
SELECT * FROM crdb_internal.node_statement_statistics ORDER BY count DESC; for per-node statement counts to confirm where the spike originates.
The order side has no CockroachDB equivalent: confirm orders-per-minute against the linked Shopify / BigCommerce / Adobe Commerce order reports.
Why our number may legitimately differ from the native view:
Cross-connector reconciliation: