Skip to main content
Metrics type: Key MetricsCategory: Cross-Platform: Revenue at Risk

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:
The CockroachDB series is the executed-statement throughput summed across live nodes, the same number the Statements per Second (live) card reports. The order series is the storefront connector’s orders-per-minute. The engine normalises both to a common cadence and compares each series against its own recent baseline. A healthy cluster shows the two curves tracking each other: a sales burst drives more reads and writes, so statements climb with orders, and a quiet spell relaxes both. The alert opens only on divergence, specifically a sharp statements spike that is not accompanied by a rise in orders. That decoupling is the tell that the extra query work is not customer-driven: a backfill job, an N+1 query loop introduced by a deploy, a transaction retry storm, or automated traffic. The card carries the spike magnitude, the busiest statement fingerprints if available, and the flat order figure so the on-call engineer can immediately see that load is up while revenue is not.

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:
  1. 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.
  2. 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.
  3. 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.
Three takeaways for the team:
  1. 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.
  2. 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.
  3. 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:

Known limitations / FAQs

Statements per second tripled but no alert fired. Why? The alert fires on divergence, statements up while orders stay flat, not on absolute throughput. If orders rose proportionally with statements, the rise is healthy scaling and the card stays quiet. Read both axes: a high statement rate that tracks a high order rate is exactly what you want to see during a peak. A scheduled backfill runs every afternoon and spikes statements. Will it alert every day? It should not, if the engine can attribute the workload. Scheduled batch windows that the engine recognises as non-storefront load are excluded so they do not raise daily false alarms. If a known job is still triggering the alert, tag or schedule it in the connector so the engine can attribute it; an unattributed spike is treated as unexpected on purpose. Orders rose but statements rose much faster. Is that a divergence? It is an efficiency change worth watching, even though it is not the classic flat-orders divergence. A statements-per-order ratio that climbs means each order now costs more database work, often an N+1 regression or a lost cache. The card surfaces it; pair with Top Contended Statements to find which statement got more expensive per order. The two curves look offset by a minute during a sharp spike. Should I worry? No. The statement and order series are polled independently and snapped to shared buckets, so a steep spike can lead the other series by a single bucket before they realign. The shape over the 15-minute window is what matters, not a one-bucket offset. Could a retry storm cause a false statements spike? It causes a real statements spike, because each retry re-executes a statement. If Transaction Retries (24h) is elevated during the spike, the extra statements are retries on contended rows rather than genuinely new work. The card is correctly reporting more statements; the contention is the upstream cause, and the fix is reducing contention, not throttling traffic. Which order series does the card use if I have multiple storefront connectors? It uses the storefront connector linked in the same Nerve Centre profile. If multiple are linked, the engine aggregates their order rates into the right-axis series. If no storefront connector is linked, the card shows the statements series alone and cannot classify spikes as demand vs waste; link an order source to unlock the comparison. The divergence is real but small and short. Do I act? A spike that subsides within a single bucket is filtered and will not raise a standing alert. A divergence that persists across several buckets is worth investigating even if modest, because sustained unexplained load tends to grow (a loop running over more data, a job falling behind). Note the timing against your deploy log; persistent small divergences are often early regressions before they become large ones.

Tracked live in Vortex IQ Nerve Centre

CRDB Statements Spike vs Ecom Order Rate is one of hundreds of KPI pulses Vortex IQ tracks across CockroachDB and 70+ other ecommerce connectors. Nerve Centre runs the detection layer; Vortex Mind investigates the cause when something moves; Ask Viq lets you interrogate any number in plain English. Start for free or book a demo to see this metric running on your own data.