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”.
| What it tracks | Two correlated series on one chart: CockroachDB statements per second (left axis) and storefront order rate (right axis), bucketed across a rolling 15-minute window so you can see whether query load and order load rise and fall together. |
| Data source | CockroachDB side: the cluster statement throughput series behind Statements per Second (live), derived from the sql.query.count / executed-statement counters across live nodes. Order side: orders-per-minute from the linked Shopify / BigCommerce / Adobe Commerce connector. |
| Metric basis | Correlation, not a single value. The signal is the relationship between the two series. A proportional rise is healthy; a statements spike without an order spike is the alert condition. |
| Time window | 15m, a rolling 15-minute window bucketed (typically per minute) so a sudden divergence shows within a bucket or two. |
| Alert trigger | qps spike with no order spike: statement throughput jumps sharply while order rate stays flat. The mismatch, not the absolute query rate, is what fires. |
| What this distinguishes | (1) Healthy scaling: statements and orders rise together; (2) Wasted load: statements spike, orders flat (runaway query, bot, retry storm, rogue job); (3) Efficiency change: orders rise but statements rise faster (a query got more expensive per order). |
| What does NOT fire | A proportional rise in both series, a scheduled batch window the engine can attribute to a non-storefront workload, and statement spikes that subside within a single bucket. |
| Roles | DBA, platform, SRE |
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.| Bucket (BST) | Statements/sec | Orders/min | Reading |
|---|---|---|---|
| 15:20 | 3,050 | 41 | baseline, tracking |
| 15:25 | 3,120 | 43 | baseline, tracking |
| 15:28 | 7,400 | 42 | statements spike, orders flat |
| 15:30 | 9,100 | 40 | divergence widening |
- 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
| Card | Why pair it with CRDB Statements Spike vs Ecom Order Rate | What the combination tells you |
|---|---|---|
| Statements per Second (live) | The raw throughput series this card joins to orders. | The raw curve shows the spike; this card shows whether orders explain it. |
| Statement Latency p95 (ms) | Where excess load first slows real users. | p95 climbing during a divergence means the rogue load is starving customer queries. |
| Top Contended Statements | Identifies which statement fingerprint spiked. | A single fingerprint dominating the spike points straight at the offending code path. |
| Transaction Retries (24h) | A retry storm can inflate statement counts. | High retries during the spike means the extra statements are retries, not new work. |
| Connection Pool Saturation % | Excess statements consume connections. | Saturation rising with the spike means the rogue load is filling the pool. |
| Statement Error Rate % | A loop can throw errors at volume. | Error rate climbing with the spike means the runaway path is also failing, compounding the waste. |
| CRDB Pool Saturation vs Traffic Burst | The sibling cross-channel card on the connection axis. | Statements and saturation both flat against traffic confirms the cluster is scaling cleanly. |
| CockroachDB Health Score | The executive composite a sustained spike feeds. | A divergence with no business cause drags the score down and flags wasted spend. |
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:
| Reason | Direction | Why |
|---|---|---|
| Two-connector join | N/A | The DB Console shows only statement throughput. The order pairing exists only in Vortex IQ; there is no native panel to reconcile the correlation against. |
| Statement vs query definition | Either way | CockroachDB counts executed SQL statements; some native panels separate reads, writes, and transactions. Confirm you are comparing the same counter. |
| Bucket alignment | Brief lag | The two series are polled independently and snapped to shared buckets. Near a sharp spike they can land a bucket apart before realigning. |
| Per-node vs cluster | Vortex IQ aggregates | This card sums statements cluster-wide; a single-node DB Console view shows only that node’s share. |
| Card | Expected relationship | What causes divergence |
|---|---|---|
| CRDB Pool Saturation vs Traffic Burst | A real order-driven statements rise usually lifts saturation too. | Statements up with saturation flat can mean a tight read loop reusing existing sessions. |
| Slow Statements During Checkout Window (5m) | A divergence that also slows checkout statements is doubly urgent. | Slow checkout statements during a divergence means the rogue load is now hurting revenue paths. |