[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-cockroachdb-benchmarking-transaction-patterns":3,"mdc-pp0zc2-key":39,"related-repo-cockroachdb-benchmarking-transaction-patterns":1681,"related-org-cockroachdb-benchmarking-transaction-patterns":1768},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":25,"repoUrl":26,"updatedAt":27,"license":28,"forks":29,"topics":30,"repo":34,"sourceUrl":37,"mdContent":38},"benchmarking-transaction-patterns","benchmark CockroachDB transaction patterns","Guides benchmarking and comparing explicit multi-statement transactions versus single-statement CTE transactions in CockroachDB, with fair test methodology, contention analysis, and performance interpretation. Use when comparing transaction formulations, benchmarking CockroachDB workloads under contention, investigating retry pressure, or deciding whether to rewrite multi-step application flows into single SQL statements.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"cockroachdb","CockroachDB","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fcockroachdb.png",[12,16,19,22],{"name":13,"slug":14,"type":15},"Performance","performance","tag",{"name":17,"slug":18,"type":15},"Database","database",{"name":20,"slug":21,"type":15},"Engineering","engineering",{"name":23,"slug":24,"type":15},"SQL","sql",3,"https:\u002F\u002Fgithub.com\u002Fcockroachdb\u002Fclaude-plugin","2026-07-12T07:57:26.543278",null,2,[31,32,8,33],"claude","cockroach-cloud","developer-tools",{"repoUrl":26,"stars":25,"forks":29,"topics":35,"description":36},[31,32,8,33],"CockroachDB development plugin for Claude","https:\u002F\u002Fgithub.com\u002Fcockroachdb\u002Fclaude-plugin\u002Ftree\u002FHEAD\u002Fskills\u002Fcockroachdb-application-development\u002Fbenchmarking-transaction-patterns","---\nname: benchmarking-transaction-patterns\ndescription: Guides benchmarking and comparing explicit multi-statement transactions versus single-statement CTE transactions in CockroachDB, with fair test methodology, contention analysis, and performance interpretation. Use when comparing transaction formulations, benchmarking CockroachDB workloads under contention, investigating retry pressure, or deciding whether to rewrite multi-step application flows into single SQL statements.\ncompatibility: \"CockroachDB >= 22.1. Requires SQL access and a test cluster for benchmark execution. Do not run benchmarks against production workloads.\"\nmetadata:\n  author: cockroachdb\n  version: \"1.0\"\n---\n\n# Benchmarking Transaction Patterns\n\nGuides users through benchmarking, explaining, and comparing two formulations of the same transactional business workflow in CockroachDB: explicit multi-statement transactions versus single-statement CTE transactions. Focuses on performance under contention, fair test methodology, and result interpretation.\n\n**Complement to design skills:** For general transaction design principles, see [designing-application-transactions](..\u002Fdesigning-application-transactions\u002FSKILL.md). For SQL syntax and query patterns, see [cockroachdb-sql](..\u002F..\u002Fcockroachdb-query-and-schema-design\u002Fcockroachdb-sql\u002FSKILL.md).\n\n## Core Concept\n\nUnder contention, the transaction formulation itself is a primary performance lever. The **explicit model** (multi-statement `BEGIN`\u002F`COMMIT`) keeps the transaction open across round trips, widening the contention window. The **CTE model** (single-statement) collapses the same logic into one atomic statement, reducing transaction duration and retries.\n\n### Explicit Transaction Model\n\n```sql\nBEGIN;\nSELECT balance FROM accounts WHERE id = $1;\n-- Application decides whether transfer is allowed\nUPDATE accounts SET balance = balance - $2 WHERE id = $1;\nUPDATE accounts SET balance = balance + $2 WHERE id = $3;\nINSERT INTO transfers (from_acct, to_acct, amount, created_at)\nVALUES ($1, $3, $2, now());\nCOMMIT;\n```\n\n### CTE Transaction Model\n\nCockroachDB rejects multiple mutations of the same table in a single statement by default (`sql.multiple_modifications_of_table.enabled`), so the debit and credit are folded into one `UPDATE` using `CASE`.\n\n```sql\nWITH funded AS (\n  SELECT 1 FROM accounts WHERE id = $1 AND balance >= $2\n), upd AS (\n  UPDATE accounts\n  SET balance = CASE WHEN id = $1 THEN balance - $2 ELSE balance + $2 END\n  WHERE id IN ($1, $3) AND EXISTS (SELECT 1 FROM funded)\n  RETURNING id\n), ins AS (\n  INSERT INTO transfers (from_acct, to_acct, amount, created_at)\n  SELECT $1, $3, $2, now() WHERE (SELECT count(*) FROM upd) = 2\n  RETURNING id\n)\nSELECT id FROM ins;\n```\n\n## Steps\n\n### 1. Prepare the Benchmark Environment\n\nSet up a dedicated test database and schema. Do not mix benchmark workloads with other traffic.\n\n```sql\nCREATE DATABASE IF NOT EXISTS bankbench;\nUSE bankbench;\n\nCREATE TABLE accounts (\n  id INT PRIMARY KEY,\n  balance DECIMAL(18,2) NOT NULL DEFAULT 0\n);\n\nCREATE TABLE transfers (\n  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),\n  from_acct INT NOT NULL,\n  to_acct INT NOT NULL,\n  amount DECIMAL(18,2) NOT NULL,\n  created_at TIMESTAMPTZ NOT NULL DEFAULT now()\n);\n```\n\n### 2. Seed the Test Data\n\nUse multi-row UPSERT for efficient seeding. Single-row inserts distort setup cost.\n\n```sql\nINSERT INTO accounts (id, balance)\nSELECT generate_series(1, 10000), 1000.00\nON CONFLICT (id) DO UPDATE SET balance = 1000.00;\n```\n\n### 3. Run the Explicit Transaction Benchmark\n\nExecute with realistic concurrency. Example using `pgbench` (PostgreSQL-compatible):\n\n```bash\n# Create a pgbench script file: explicit_transfer.sql\n# \\set from_id random(1, 10000)\n# \\set to_id random(1, 10000)\n# \\set amount 10.00\n# BEGIN;\n# SELECT balance FROM accounts WHERE id = :from_id;\n# UPDATE accounts SET balance = balance - :amount WHERE id = :from_id;\n# UPDATE accounts SET balance = balance + :amount WHERE id = :to_id;\n# INSERT INTO transfers (from_acct, to_acct, amount, created_at) VALUES (:from_id, :to_id, :amount, now());\n# COMMIT;\n\npgbench -n -c 64 -j 8 -T 120 -f explicit_transfer.sql \\\n  \"postgresql:\u002F\u002Froot@localhost:26257\u002Fbankbench?sslmode=disable\"\n```\n\nRecord throughput (tps), retries, p50\u002Fp95\u002Fp99 latency, max latency, and failures.\n\n### 4. Reset Between Runs for Fair Comparison\n\nFor a fair benchmark, reset account balances between explicit and CTE runs so table size, index size, and account state remain comparable.\n\n```sql\nUPDATE accounts SET balance = 1000.00;\n```\n\n### 5. Run the CTE Transaction Benchmark\n\nExecute with the same concurrency, duration, and parameters as the explicit run:\n\n```bash\n# Create a pgbench script file: cte_transfer.sql containing the CTE query above\npgbench -n -c 64 -j 8 -T 120 -f cte_transfer.sql \\\n  \"postgresql:\u002F\u002Froot@localhost:26257\u002Fbankbench?sslmode=disable\"\n```\n\n### 6. Compare Results\n\nAlways compare these metrics side by side:\n\n| Metric             | What to Look For                                                 |\n|--------------------|------------------------------------------------------------------|\n| Throughput (txn\u002Fs) | Higher is better; CTE typically sustains better under contention |\n| Total retries      | CTE often reduces to near-zero                                   |\n| p50 latency        | Median transaction time                                          |\n| p95 latency        | Tail latency under moderate contention                           |\n| p99 latency        | Worst-case tail; explicit model often shows spikes               |\n| Max latency        | Outlier behavior                                                 |\n| Failures           | Non-retryable errors                                             |\n\n### 7. Validate Benchmark Integrity\n\nBefore interpreting results, verify the benchmark ran cleanly:\n\n```sql\n-- Confirm expected transfer volume\nSELECT COUNT(*) AS total_transfers FROM transfers;\n```\n\n```bash\n# Check node liveness and start times (no node restarts mid-benchmark)\ncockroach node status --certs-dir=\u003Ccerts-dir>     # or --insecure for an insecure cluster\n```\n\n## Benchmark Reference Results\n\nIn a reported high-contention run comparing the two models:\n\n| Metric          | Explicit    | CTE           | Change |\n|-----------------|-------------|---------------|--------|\n| Throughput      | 591.1 txn\u002Fs | 1,035.1 txn\u002Fs | +75.1% |\n| Wall time       | 216.5s      | 123.7s        | -42.9% |\n| Average latency | 202.2 ms    | 111.3 ms      | -45.0% |\n| Total retries   | 2,270,977   | 0             | -100%  |\n\nExtended runs preserved the same directional result at higher total volume, with the explicit model continuing to accumulate retries and occasional failures while the CTE model stayed at zero retries and zero failures.\n\n### Impact Summary\n\n| Dimension                    | Explicit Multi-Statement            | Single-Statement CTE    |\n|------------------------------|-------------------------------------|-------------------------|\n| Round trips                  | Multiple client\u002Fserver interactions | Single request          |\n| Transaction lifetime         | Longer                              | Shorter                 |\n| Client retry complexity      | Higher                              | Lower                   |\n| Atomic invariant enforcement | Spread across statements\u002Fapp logic  | Contained in SQL        |\n| Expected throughput          | Lower under contention              | Higher under contention |\n| Client-visible retries       | More likely                         | Often reduced           |\n\n## Decision Guidance\n\n### Prefer the Explicit Pattern When\n\n- The business workflow truly cannot be expressed cleanly in one SQL statement\n- Readability or staged business logic matters more than peak throughput\n- The contention level is low enough that retry amplification is not the dominant cost\n\n### Prefer the CTE Pattern When\n\n- The workflow is contention-heavy\n- The operation is naturally atomic\n- The application currently performs read-decide-write across multiple statements\n- The main goal is higher throughput, lower retries, and more stable p95\u002Fp99 latency\n\n## Fair Benchmark Rules\n\n1. **Reset between runs** for fair comparison so balances, table size, and index size stay consistent\n2. **Treat no-reset runs as a demo**, not an apples-to-apples benchmark\n3. **Use `--batch-size=1`** when you want one business unit of work at a time for clean comparison\n4. **Compare the right metrics** — always include throughput, retries, p50, p95, p99, max latency, and failures\n5. **Use multi-row UPSERT for seeding** — single-row seeding distorts setup cost\n\n## Common Misconceptions\n\n- **\"CTE always wins\"** — Only when the workflow is contention-sensitive and expressible as a single atomic statement.\n- **\"SQL Activity showing waiting means CTE failed\"** — CTE reduces but does not eliminate contention. Compare throughput, tail latency, and retry profile.\n- **\"Single-statement means no contention\"** — CTE narrows the contention window but does not eliminate it.\n\n## Safety Considerations\n\n- Run benchmarks on dedicated test clusters, not production\n- Reset data between runs for fair comparison\n- Monitor cluster health during benchmark execution\n- Use realistic but not destructive concurrency levels\n- Validate that benchmark results transfer to your specific workload before making production changes\n\n## References\n\n- [CockroachDB Transactions Documentation](https:\u002F\u002Fwww.cockroachlabs.com\u002Fdocs\u002Fstable\u002Ftransactions)\n- [Advanced Client-Side Transaction Retries](https:\u002F\u002Fwww.cockroachlabs.com\u002Fdocs\u002Fstable\u002Fadvanced-client-side-transaction-retries)\n- [Performance Best Practices](https:\u002F\u002Fwww.cockroachlabs.com\u002Fdocs\u002Fstable\u002Fperformance-best-practices-overview)\n- [Comparing Multi-Statement vs Single-Statement Transactions](https:\u002F\u002Fandrewdeally.medium.com\u002Fcomparing-multi-statement-vs-single-statement-transactions-for-account-transfers-in-sql-09190b116e64)\n- [Set-Based Operations with CockroachDB](https:\u002F\u002Fandrewdeally.medium.com\u002Fset-based-operations-with-cockroachdb-c9f371992dc7)\n- [Deep Dive into Transaction Retry Failures](https:\u002F\u002Fwww.mindfulchase.com\u002Fexplore\u002Ftroubleshooting-tips\u002Fdatabases\u002Fdeep-dive-into-transaction-retry-failures-in-cockroachdb-root-causes-and-fixes.html)\n- [Troubleshooting CockroachDB Performance](https:\u002F\u002Fwww.mindfulchase.com\u002Fexplore\u002Ftroubleshooting-tips\u002Fdatabases\u002Ftroubleshooting-cockroachdb-performance-in-enterprise-deployments.html)\n- [CockroachDB Transaction Demo](https:\u002F\u002Fgithub.com\u002Fcockroachdb\u002Fcockroach-transaction-demo)\n- [CockroachDB Best Practices & Anti-Patterns Demo](https:\u002F\u002Fgithub.com\u002Fviragtripathi\u002Fcockroachdb-best-practices-demo) -- Demos 1-2 show retry patterns and contention scaling under concurrency\n",{"data":40,"body":44},{"name":4,"description":6,"compatibility":41,"metadata":42},"CockroachDB >= 22.1. Requires SQL access and a test cluster for benchmark execution. Do not run benchmarks against production workloads.",{"author":8,"version":43},"1.0",{"type":45,"children":46},"root",[47,55,61,89,96,132,139,221,227,255,370,376,382,387,515,521,526,557,563,576,753,758,764,769,783,789,794,872,878,883,1002,1008,1013,1036,1094,1100,1105,1227,1232,1238,1373,1379,1385,1405,1411,1434,1440,1500,1506,1539,1545,1573,1579,1675],{"type":48,"tag":49,"props":50,"children":51},"element","h1",{"id":4},[52],{"type":53,"value":54},"text","Benchmarking Transaction Patterns",{"type":48,"tag":56,"props":57,"children":58},"p",{},[59],{"type":53,"value":60},"Guides users through benchmarking, explaining, and comparing two formulations of the same transactional business workflow in CockroachDB: explicit multi-statement transactions versus single-statement CTE transactions. Focuses on performance under contention, fair test methodology, and result interpretation.",{"type":48,"tag":56,"props":62,"children":63},{},[64,70,72,79,81,87],{"type":48,"tag":65,"props":66,"children":67},"strong",{},[68],{"type":53,"value":69},"Complement to design skills:",{"type":53,"value":71}," For general transaction design principles, see ",{"type":48,"tag":73,"props":74,"children":76},"a",{"href":75},"..\u002Fdesigning-application-transactions\u002FSKILL.md",[77],{"type":53,"value":78},"designing-application-transactions",{"type":53,"value":80},". For SQL syntax and query patterns, see ",{"type":48,"tag":73,"props":82,"children":84},{"href":83},"..\u002F..\u002Fcockroachdb-query-and-schema-design\u002Fcockroachdb-sql\u002FSKILL.md",[85],{"type":53,"value":86},"cockroachdb-sql",{"type":53,"value":88},".",{"type":48,"tag":90,"props":91,"children":93},"h2",{"id":92},"core-concept",[94],{"type":53,"value":95},"Core Concept",{"type":48,"tag":56,"props":97,"children":98},{},[99,101,106,108,115,117,123,125,130],{"type":53,"value":100},"Under contention, the transaction formulation itself is a primary performance lever. The ",{"type":48,"tag":65,"props":102,"children":103},{},[104],{"type":53,"value":105},"explicit model",{"type":53,"value":107}," (multi-statement ",{"type":48,"tag":109,"props":110,"children":112},"code",{"className":111},[],[113],{"type":53,"value":114},"BEGIN",{"type":53,"value":116},"\u002F",{"type":48,"tag":109,"props":118,"children":120},{"className":119},[],[121],{"type":53,"value":122},"COMMIT",{"type":53,"value":124},") keeps the transaction open across round trips, widening the contention window. The ",{"type":48,"tag":65,"props":126,"children":127},{},[128],{"type":53,"value":129},"CTE model",{"type":53,"value":131}," (single-statement) collapses the same logic into one atomic statement, reducing transaction duration and retries.",{"type":48,"tag":133,"props":134,"children":136},"h3",{"id":135},"explicit-transaction-model",[137],{"type":53,"value":138},"Explicit Transaction Model",{"type":48,"tag":140,"props":141,"children":145},"pre",{"className":142,"code":143,"language":24,"meta":144,"style":144},"language-sql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","BEGIN;\nSELECT balance FROM accounts WHERE id = $1;\n-- Application decides whether transfer is allowed\nUPDATE accounts SET balance = balance - $2 WHERE id = $1;\nUPDATE accounts SET balance = balance + $2 WHERE id = $3;\nINSERT INTO transfers (from_acct, to_acct, amount, created_at)\nVALUES ($1, $3, $2, now());\nCOMMIT;\n","",[146],{"type":48,"tag":109,"props":147,"children":148},{"__ignoreMap":144},[149,160,168,176,185,194,203,212],{"type":48,"tag":150,"props":151,"children":154},"span",{"class":152,"line":153},"line",1,[155],{"type":48,"tag":150,"props":156,"children":157},{},[158],{"type":53,"value":159},"BEGIN;\n",{"type":48,"tag":150,"props":161,"children":162},{"class":152,"line":29},[163],{"type":48,"tag":150,"props":164,"children":165},{},[166],{"type":53,"value":167},"SELECT balance FROM accounts WHERE id = $1;\n",{"type":48,"tag":150,"props":169,"children":170},{"class":152,"line":25},[171],{"type":48,"tag":150,"props":172,"children":173},{},[174],{"type":53,"value":175},"-- Application decides whether transfer is allowed\n",{"type":48,"tag":150,"props":177,"children":179},{"class":152,"line":178},4,[180],{"type":48,"tag":150,"props":181,"children":182},{},[183],{"type":53,"value":184},"UPDATE accounts SET balance = balance - $2 WHERE id = $1;\n",{"type":48,"tag":150,"props":186,"children":188},{"class":152,"line":187},5,[189],{"type":48,"tag":150,"props":190,"children":191},{},[192],{"type":53,"value":193},"UPDATE accounts SET balance = balance + $2 WHERE id = $3;\n",{"type":48,"tag":150,"props":195,"children":197},{"class":152,"line":196},6,[198],{"type":48,"tag":150,"props":199,"children":200},{},[201],{"type":53,"value":202},"INSERT INTO transfers (from_acct, to_acct, amount, created_at)\n",{"type":48,"tag":150,"props":204,"children":206},{"class":152,"line":205},7,[207],{"type":48,"tag":150,"props":208,"children":209},{},[210],{"type":53,"value":211},"VALUES ($1, $3, $2, now());\n",{"type":48,"tag":150,"props":213,"children":215},{"class":152,"line":214},8,[216],{"type":48,"tag":150,"props":217,"children":218},{},[219],{"type":53,"value":220},"COMMIT;\n",{"type":48,"tag":133,"props":222,"children":224},{"id":223},"cte-transaction-model",[225],{"type":53,"value":226},"CTE Transaction Model",{"type":48,"tag":56,"props":228,"children":229},{},[230,232,238,240,246,248,254],{"type":53,"value":231},"CockroachDB rejects multiple mutations of the same table in a single statement by default (",{"type":48,"tag":109,"props":233,"children":235},{"className":234},[],[236],{"type":53,"value":237},"sql.multiple_modifications_of_table.enabled",{"type":53,"value":239},"), so the debit and credit are folded into one ",{"type":48,"tag":109,"props":241,"children":243},{"className":242},[],[244],{"type":53,"value":245},"UPDATE",{"type":53,"value":247}," using ",{"type":48,"tag":109,"props":249,"children":251},{"className":250},[],[252],{"type":53,"value":253},"CASE",{"type":53,"value":88},{"type":48,"tag":140,"props":256,"children":258},{"className":142,"code":257,"language":24,"meta":144,"style":144},"WITH funded AS (\n  SELECT 1 FROM accounts WHERE id = $1 AND balance >= $2\n), upd AS (\n  UPDATE accounts\n  SET balance = CASE WHEN id = $1 THEN balance - $2 ELSE balance + $2 END\n  WHERE id IN ($1, $3) AND EXISTS (SELECT 1 FROM funded)\n  RETURNING id\n), ins AS (\n  INSERT INTO transfers (from_acct, to_acct, amount, created_at)\n  SELECT $1, $3, $2, now() WHERE (SELECT count(*) FROM upd) = 2\n  RETURNING id\n)\nSELECT id FROM ins;\n",[259],{"type":48,"tag":109,"props":260,"children":261},{"__ignoreMap":144},[262,270,278,286,294,302,310,318,326,335,344,352,361],{"type":48,"tag":150,"props":263,"children":264},{"class":152,"line":153},[265],{"type":48,"tag":150,"props":266,"children":267},{},[268],{"type":53,"value":269},"WITH funded AS (\n",{"type":48,"tag":150,"props":271,"children":272},{"class":152,"line":29},[273],{"type":48,"tag":150,"props":274,"children":275},{},[276],{"type":53,"value":277},"  SELECT 1 FROM accounts WHERE id = $1 AND balance >= $2\n",{"type":48,"tag":150,"props":279,"children":280},{"class":152,"line":25},[281],{"type":48,"tag":150,"props":282,"children":283},{},[284],{"type":53,"value":285},"), upd AS (\n",{"type":48,"tag":150,"props":287,"children":288},{"class":152,"line":178},[289],{"type":48,"tag":150,"props":290,"children":291},{},[292],{"type":53,"value":293},"  UPDATE accounts\n",{"type":48,"tag":150,"props":295,"children":296},{"class":152,"line":187},[297],{"type":48,"tag":150,"props":298,"children":299},{},[300],{"type":53,"value":301},"  SET balance = CASE WHEN id = $1 THEN balance - $2 ELSE balance + $2 END\n",{"type":48,"tag":150,"props":303,"children":304},{"class":152,"line":196},[305],{"type":48,"tag":150,"props":306,"children":307},{},[308],{"type":53,"value":309},"  WHERE id IN ($1, $3) AND EXISTS (SELECT 1 FROM funded)\n",{"type":48,"tag":150,"props":311,"children":312},{"class":152,"line":205},[313],{"type":48,"tag":150,"props":314,"children":315},{},[316],{"type":53,"value":317},"  RETURNING id\n",{"type":48,"tag":150,"props":319,"children":320},{"class":152,"line":214},[321],{"type":48,"tag":150,"props":322,"children":323},{},[324],{"type":53,"value":325},"), ins AS (\n",{"type":48,"tag":150,"props":327,"children":329},{"class":152,"line":328},9,[330],{"type":48,"tag":150,"props":331,"children":332},{},[333],{"type":53,"value":334},"  INSERT INTO transfers (from_acct, to_acct, amount, created_at)\n",{"type":48,"tag":150,"props":336,"children":338},{"class":152,"line":337},10,[339],{"type":48,"tag":150,"props":340,"children":341},{},[342],{"type":53,"value":343},"  SELECT $1, $3, $2, now() WHERE (SELECT count(*) FROM upd) = 2\n",{"type":48,"tag":150,"props":345,"children":347},{"class":152,"line":346},11,[348],{"type":48,"tag":150,"props":349,"children":350},{},[351],{"type":53,"value":317},{"type":48,"tag":150,"props":353,"children":355},{"class":152,"line":354},12,[356],{"type":48,"tag":150,"props":357,"children":358},{},[359],{"type":53,"value":360},")\n",{"type":48,"tag":150,"props":362,"children":364},{"class":152,"line":363},13,[365],{"type":48,"tag":150,"props":366,"children":367},{},[368],{"type":53,"value":369},"SELECT id FROM ins;\n",{"type":48,"tag":90,"props":371,"children":373},{"id":372},"steps",[374],{"type":53,"value":375},"Steps",{"type":48,"tag":133,"props":377,"children":379},{"id":378},"_1-prepare-the-benchmark-environment",[380],{"type":53,"value":381},"1. Prepare the Benchmark Environment",{"type":48,"tag":56,"props":383,"children":384},{},[385],{"type":53,"value":386},"Set up a dedicated test database and schema. Do not mix benchmark workloads with other traffic.",{"type":48,"tag":140,"props":388,"children":390},{"className":142,"code":389,"language":24,"meta":144,"style":144},"CREATE DATABASE IF NOT EXISTS bankbench;\nUSE bankbench;\n\nCREATE TABLE accounts (\n  id INT PRIMARY KEY,\n  balance DECIMAL(18,2) NOT NULL DEFAULT 0\n);\n\nCREATE TABLE transfers (\n  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),\n  from_acct INT NOT NULL,\n  to_acct INT NOT NULL,\n  amount DECIMAL(18,2) NOT NULL,\n  created_at TIMESTAMPTZ NOT NULL DEFAULT now()\n);\n",[391],{"type":48,"tag":109,"props":392,"children":393},{"__ignoreMap":144},[394,402,410,419,427,435,443,451,458,466,474,482,490,498,507],{"type":48,"tag":150,"props":395,"children":396},{"class":152,"line":153},[397],{"type":48,"tag":150,"props":398,"children":399},{},[400],{"type":53,"value":401},"CREATE DATABASE IF NOT EXISTS bankbench;\n",{"type":48,"tag":150,"props":403,"children":404},{"class":152,"line":29},[405],{"type":48,"tag":150,"props":406,"children":407},{},[408],{"type":53,"value":409},"USE bankbench;\n",{"type":48,"tag":150,"props":411,"children":412},{"class":152,"line":25},[413],{"type":48,"tag":150,"props":414,"children":416},{"emptyLinePlaceholder":415},true,[417],{"type":53,"value":418},"\n",{"type":48,"tag":150,"props":420,"children":421},{"class":152,"line":178},[422],{"type":48,"tag":150,"props":423,"children":424},{},[425],{"type":53,"value":426},"CREATE TABLE accounts (\n",{"type":48,"tag":150,"props":428,"children":429},{"class":152,"line":187},[430],{"type":48,"tag":150,"props":431,"children":432},{},[433],{"type":53,"value":434},"  id INT PRIMARY KEY,\n",{"type":48,"tag":150,"props":436,"children":437},{"class":152,"line":196},[438],{"type":48,"tag":150,"props":439,"children":440},{},[441],{"type":53,"value":442},"  balance DECIMAL(18,2) NOT NULL DEFAULT 0\n",{"type":48,"tag":150,"props":444,"children":445},{"class":152,"line":205},[446],{"type":48,"tag":150,"props":447,"children":448},{},[449],{"type":53,"value":450},");\n",{"type":48,"tag":150,"props":452,"children":453},{"class":152,"line":214},[454],{"type":48,"tag":150,"props":455,"children":456},{"emptyLinePlaceholder":415},[457],{"type":53,"value":418},{"type":48,"tag":150,"props":459,"children":460},{"class":152,"line":328},[461],{"type":48,"tag":150,"props":462,"children":463},{},[464],{"type":53,"value":465},"CREATE TABLE transfers (\n",{"type":48,"tag":150,"props":467,"children":468},{"class":152,"line":337},[469],{"type":48,"tag":150,"props":470,"children":471},{},[472],{"type":53,"value":473},"  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),\n",{"type":48,"tag":150,"props":475,"children":476},{"class":152,"line":346},[477],{"type":48,"tag":150,"props":478,"children":479},{},[480],{"type":53,"value":481},"  from_acct INT NOT NULL,\n",{"type":48,"tag":150,"props":483,"children":484},{"class":152,"line":354},[485],{"type":48,"tag":150,"props":486,"children":487},{},[488],{"type":53,"value":489},"  to_acct INT NOT NULL,\n",{"type":48,"tag":150,"props":491,"children":492},{"class":152,"line":363},[493],{"type":48,"tag":150,"props":494,"children":495},{},[496],{"type":53,"value":497},"  amount DECIMAL(18,2) NOT NULL,\n",{"type":48,"tag":150,"props":499,"children":501},{"class":152,"line":500},14,[502],{"type":48,"tag":150,"props":503,"children":504},{},[505],{"type":53,"value":506},"  created_at TIMESTAMPTZ NOT NULL DEFAULT now()\n",{"type":48,"tag":150,"props":508,"children":510},{"class":152,"line":509},15,[511],{"type":48,"tag":150,"props":512,"children":513},{},[514],{"type":53,"value":450},{"type":48,"tag":133,"props":516,"children":518},{"id":517},"_2-seed-the-test-data",[519],{"type":53,"value":520},"2. Seed the Test Data",{"type":48,"tag":56,"props":522,"children":523},{},[524],{"type":53,"value":525},"Use multi-row UPSERT for efficient seeding. Single-row inserts distort setup cost.",{"type":48,"tag":140,"props":527,"children":529},{"className":142,"code":528,"language":24,"meta":144,"style":144},"INSERT INTO accounts (id, balance)\nSELECT generate_series(1, 10000), 1000.00\nON CONFLICT (id) DO UPDATE SET balance = 1000.00;\n",[530],{"type":48,"tag":109,"props":531,"children":532},{"__ignoreMap":144},[533,541,549],{"type":48,"tag":150,"props":534,"children":535},{"class":152,"line":153},[536],{"type":48,"tag":150,"props":537,"children":538},{},[539],{"type":53,"value":540},"INSERT INTO accounts (id, balance)\n",{"type":48,"tag":150,"props":542,"children":543},{"class":152,"line":29},[544],{"type":48,"tag":150,"props":545,"children":546},{},[547],{"type":53,"value":548},"SELECT generate_series(1, 10000), 1000.00\n",{"type":48,"tag":150,"props":550,"children":551},{"class":152,"line":25},[552],{"type":48,"tag":150,"props":553,"children":554},{},[555],{"type":53,"value":556},"ON CONFLICT (id) DO UPDATE SET balance = 1000.00;\n",{"type":48,"tag":133,"props":558,"children":560},{"id":559},"_3-run-the-explicit-transaction-benchmark",[561],{"type":53,"value":562},"3. Run the Explicit Transaction Benchmark",{"type":48,"tag":56,"props":564,"children":565},{},[566,568,574],{"type":53,"value":567},"Execute with realistic concurrency. Example using ",{"type":48,"tag":109,"props":569,"children":571},{"className":570},[],[572],{"type":53,"value":573},"pgbench",{"type":53,"value":575}," (PostgreSQL-compatible):",{"type":48,"tag":140,"props":577,"children":581},{"className":578,"code":579,"language":580,"meta":144,"style":144},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# Create a pgbench script file: explicit_transfer.sql\n# \\set from_id random(1, 10000)\n# \\set to_id random(1, 10000)\n# \\set amount 10.00\n# BEGIN;\n# SELECT balance FROM accounts WHERE id = :from_id;\n# UPDATE accounts SET balance = balance - :amount WHERE id = :from_id;\n# UPDATE accounts SET balance = balance + :amount WHERE id = :to_id;\n# INSERT INTO transfers (from_acct, to_acct, amount, created_at) VALUES (:from_id, :to_id, :amount, now());\n# COMMIT;\n\npgbench -n -c 64 -j 8 -T 120 -f explicit_transfer.sql \\\n  \"postgresql:\u002F\u002Froot@localhost:26257\u002Fbankbench?sslmode=disable\"\n","bash",[582],{"type":48,"tag":109,"props":583,"children":584},{"__ignoreMap":144},[585,594,602,610,618,626,634,642,650,658,666,673,734],{"type":48,"tag":150,"props":586,"children":587},{"class":152,"line":153},[588],{"type":48,"tag":150,"props":589,"children":591},{"style":590},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[592],{"type":53,"value":593},"# Create a pgbench script file: explicit_transfer.sql\n",{"type":48,"tag":150,"props":595,"children":596},{"class":152,"line":29},[597],{"type":48,"tag":150,"props":598,"children":599},{"style":590},[600],{"type":53,"value":601},"# \\set from_id random(1, 10000)\n",{"type":48,"tag":150,"props":603,"children":604},{"class":152,"line":25},[605],{"type":48,"tag":150,"props":606,"children":607},{"style":590},[608],{"type":53,"value":609},"# \\set to_id random(1, 10000)\n",{"type":48,"tag":150,"props":611,"children":612},{"class":152,"line":178},[613],{"type":48,"tag":150,"props":614,"children":615},{"style":590},[616],{"type":53,"value":617},"# \\set amount 10.00\n",{"type":48,"tag":150,"props":619,"children":620},{"class":152,"line":187},[621],{"type":48,"tag":150,"props":622,"children":623},{"style":590},[624],{"type":53,"value":625},"# BEGIN;\n",{"type":48,"tag":150,"props":627,"children":628},{"class":152,"line":196},[629],{"type":48,"tag":150,"props":630,"children":631},{"style":590},[632],{"type":53,"value":633},"# SELECT balance FROM accounts WHERE id = :from_id;\n",{"type":48,"tag":150,"props":635,"children":636},{"class":152,"line":205},[637],{"type":48,"tag":150,"props":638,"children":639},{"style":590},[640],{"type":53,"value":641},"# UPDATE accounts SET balance = balance - :amount WHERE id = :from_id;\n",{"type":48,"tag":150,"props":643,"children":644},{"class":152,"line":214},[645],{"type":48,"tag":150,"props":646,"children":647},{"style":590},[648],{"type":53,"value":649},"# UPDATE accounts SET balance = balance + :amount WHERE id = :to_id;\n",{"type":48,"tag":150,"props":651,"children":652},{"class":152,"line":328},[653],{"type":48,"tag":150,"props":654,"children":655},{"style":590},[656],{"type":53,"value":657},"# INSERT INTO transfers (from_acct, to_acct, amount, created_at) VALUES (:from_id, :to_id, :amount, now());\n",{"type":48,"tag":150,"props":659,"children":660},{"class":152,"line":337},[661],{"type":48,"tag":150,"props":662,"children":663},{"style":590},[664],{"type":53,"value":665},"# COMMIT;\n",{"type":48,"tag":150,"props":667,"children":668},{"class":152,"line":346},[669],{"type":48,"tag":150,"props":670,"children":671},{"emptyLinePlaceholder":415},[672],{"type":53,"value":418},{"type":48,"tag":150,"props":674,"children":675},{"class":152,"line":354},[676,681,687,692,698,703,708,713,718,723,728],{"type":48,"tag":150,"props":677,"children":679},{"style":678},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[680],{"type":53,"value":573},{"type":48,"tag":150,"props":682,"children":684},{"style":683},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[685],{"type":53,"value":686}," -n",{"type":48,"tag":150,"props":688,"children":689},{"style":683},[690],{"type":53,"value":691}," -c",{"type":48,"tag":150,"props":693,"children":695},{"style":694},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[696],{"type":53,"value":697}," 64",{"type":48,"tag":150,"props":699,"children":700},{"style":683},[701],{"type":53,"value":702}," -j",{"type":48,"tag":150,"props":704,"children":705},{"style":694},[706],{"type":53,"value":707}," 8",{"type":48,"tag":150,"props":709,"children":710},{"style":683},[711],{"type":53,"value":712}," -T",{"type":48,"tag":150,"props":714,"children":715},{"style":694},[716],{"type":53,"value":717}," 120",{"type":48,"tag":150,"props":719,"children":720},{"style":683},[721],{"type":53,"value":722}," -f",{"type":48,"tag":150,"props":724,"children":725},{"style":683},[726],{"type":53,"value":727}," explicit_transfer.sql",{"type":48,"tag":150,"props":729,"children":731},{"style":730},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[732],{"type":53,"value":733}," \\\n",{"type":48,"tag":150,"props":735,"children":736},{"class":152,"line":363},[737,743,748],{"type":48,"tag":150,"props":738,"children":740},{"style":739},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[741],{"type":53,"value":742},"  \"",{"type":48,"tag":150,"props":744,"children":745},{"style":683},[746],{"type":53,"value":747},"postgresql:\u002F\u002Froot@localhost:26257\u002Fbankbench?sslmode=disable",{"type":48,"tag":150,"props":749,"children":750},{"style":739},[751],{"type":53,"value":752},"\"\n",{"type":48,"tag":56,"props":754,"children":755},{},[756],{"type":53,"value":757},"Record throughput (tps), retries, p50\u002Fp95\u002Fp99 latency, max latency, and failures.",{"type":48,"tag":133,"props":759,"children":761},{"id":760},"_4-reset-between-runs-for-fair-comparison",[762],{"type":53,"value":763},"4. Reset Between Runs for Fair Comparison",{"type":48,"tag":56,"props":765,"children":766},{},[767],{"type":53,"value":768},"For a fair benchmark, reset account balances between explicit and CTE runs so table size, index size, and account state remain comparable.",{"type":48,"tag":140,"props":770,"children":772},{"className":142,"code":771,"language":24,"meta":144,"style":144},"UPDATE accounts SET balance = 1000.00;\n",[773],{"type":48,"tag":109,"props":774,"children":775},{"__ignoreMap":144},[776],{"type":48,"tag":150,"props":777,"children":778},{"class":152,"line":153},[779],{"type":48,"tag":150,"props":780,"children":781},{},[782],{"type":53,"value":771},{"type":48,"tag":133,"props":784,"children":786},{"id":785},"_5-run-the-cte-transaction-benchmark",[787],{"type":53,"value":788},"5. Run the CTE Transaction Benchmark",{"type":48,"tag":56,"props":790,"children":791},{},[792],{"type":53,"value":793},"Execute with the same concurrency, duration, and parameters as the explicit run:",{"type":48,"tag":140,"props":795,"children":797},{"className":578,"code":796,"language":580,"meta":144,"style":144},"# Create a pgbench script file: cte_transfer.sql containing the CTE query above\npgbench -n -c 64 -j 8 -T 120 -f cte_transfer.sql \\\n  \"postgresql:\u002F\u002Froot@localhost:26257\u002Fbankbench?sslmode=disable\"\n",[798],{"type":48,"tag":109,"props":799,"children":800},{"__ignoreMap":144},[801,809,857],{"type":48,"tag":150,"props":802,"children":803},{"class":152,"line":153},[804],{"type":48,"tag":150,"props":805,"children":806},{"style":590},[807],{"type":53,"value":808},"# Create a pgbench script file: cte_transfer.sql containing the CTE query above\n",{"type":48,"tag":150,"props":810,"children":811},{"class":152,"line":29},[812,816,820,824,828,832,836,840,844,848,853],{"type":48,"tag":150,"props":813,"children":814},{"style":678},[815],{"type":53,"value":573},{"type":48,"tag":150,"props":817,"children":818},{"style":683},[819],{"type":53,"value":686},{"type":48,"tag":150,"props":821,"children":822},{"style":683},[823],{"type":53,"value":691},{"type":48,"tag":150,"props":825,"children":826},{"style":694},[827],{"type":53,"value":697},{"type":48,"tag":150,"props":829,"children":830},{"style":683},[831],{"type":53,"value":702},{"type":48,"tag":150,"props":833,"children":834},{"style":694},[835],{"type":53,"value":707},{"type":48,"tag":150,"props":837,"children":838},{"style":683},[839],{"type":53,"value":712},{"type":48,"tag":150,"props":841,"children":842},{"style":694},[843],{"type":53,"value":717},{"type":48,"tag":150,"props":845,"children":846},{"style":683},[847],{"type":53,"value":722},{"type":48,"tag":150,"props":849,"children":850},{"style":683},[851],{"type":53,"value":852}," cte_transfer.sql",{"type":48,"tag":150,"props":854,"children":855},{"style":730},[856],{"type":53,"value":733},{"type":48,"tag":150,"props":858,"children":859},{"class":152,"line":25},[860,864,868],{"type":48,"tag":150,"props":861,"children":862},{"style":739},[863],{"type":53,"value":742},{"type":48,"tag":150,"props":865,"children":866},{"style":683},[867],{"type":53,"value":747},{"type":48,"tag":150,"props":869,"children":870},{"style":739},[871],{"type":53,"value":752},{"type":48,"tag":133,"props":873,"children":875},{"id":874},"_6-compare-results",[876],{"type":53,"value":877},"6. Compare Results",{"type":48,"tag":56,"props":879,"children":880},{},[881],{"type":53,"value":882},"Always compare these metrics side by side:",{"type":48,"tag":884,"props":885,"children":886},"table",{},[887,906],{"type":48,"tag":888,"props":889,"children":890},"thead",{},[891],{"type":48,"tag":892,"props":893,"children":894},"tr",{},[895,901],{"type":48,"tag":896,"props":897,"children":898},"th",{},[899],{"type":53,"value":900},"Metric",{"type":48,"tag":896,"props":902,"children":903},{},[904],{"type":53,"value":905},"What to Look For",{"type":48,"tag":907,"props":908,"children":909},"tbody",{},[910,924,937,950,963,976,989],{"type":48,"tag":892,"props":911,"children":912},{},[913,919],{"type":48,"tag":914,"props":915,"children":916},"td",{},[917],{"type":53,"value":918},"Throughput (txn\u002Fs)",{"type":48,"tag":914,"props":920,"children":921},{},[922],{"type":53,"value":923},"Higher is better; CTE typically sustains better under contention",{"type":48,"tag":892,"props":925,"children":926},{},[927,932],{"type":48,"tag":914,"props":928,"children":929},{},[930],{"type":53,"value":931},"Total retries",{"type":48,"tag":914,"props":933,"children":934},{},[935],{"type":53,"value":936},"CTE often reduces to near-zero",{"type":48,"tag":892,"props":938,"children":939},{},[940,945],{"type":48,"tag":914,"props":941,"children":942},{},[943],{"type":53,"value":944},"p50 latency",{"type":48,"tag":914,"props":946,"children":947},{},[948],{"type":53,"value":949},"Median transaction time",{"type":48,"tag":892,"props":951,"children":952},{},[953,958],{"type":48,"tag":914,"props":954,"children":955},{},[956],{"type":53,"value":957},"p95 latency",{"type":48,"tag":914,"props":959,"children":960},{},[961],{"type":53,"value":962},"Tail latency under moderate contention",{"type":48,"tag":892,"props":964,"children":965},{},[966,971],{"type":48,"tag":914,"props":967,"children":968},{},[969],{"type":53,"value":970},"p99 latency",{"type":48,"tag":914,"props":972,"children":973},{},[974],{"type":53,"value":975},"Worst-case tail; explicit model often shows spikes",{"type":48,"tag":892,"props":977,"children":978},{},[979,984],{"type":48,"tag":914,"props":980,"children":981},{},[982],{"type":53,"value":983},"Max latency",{"type":48,"tag":914,"props":985,"children":986},{},[987],{"type":53,"value":988},"Outlier behavior",{"type":48,"tag":892,"props":990,"children":991},{},[992,997],{"type":48,"tag":914,"props":993,"children":994},{},[995],{"type":53,"value":996},"Failures",{"type":48,"tag":914,"props":998,"children":999},{},[1000],{"type":53,"value":1001},"Non-retryable errors",{"type":48,"tag":133,"props":1003,"children":1005},{"id":1004},"_7-validate-benchmark-integrity",[1006],{"type":53,"value":1007},"7. Validate Benchmark Integrity",{"type":48,"tag":56,"props":1009,"children":1010},{},[1011],{"type":53,"value":1012},"Before interpreting results, verify the benchmark ran cleanly:",{"type":48,"tag":140,"props":1014,"children":1016},{"className":142,"code":1015,"language":24,"meta":144,"style":144},"-- Confirm expected transfer volume\nSELECT COUNT(*) AS total_transfers FROM transfers;\n",[1017],{"type":48,"tag":109,"props":1018,"children":1019},{"__ignoreMap":144},[1020,1028],{"type":48,"tag":150,"props":1021,"children":1022},{"class":152,"line":153},[1023],{"type":48,"tag":150,"props":1024,"children":1025},{},[1026],{"type":53,"value":1027},"-- Confirm expected transfer volume\n",{"type":48,"tag":150,"props":1029,"children":1030},{"class":152,"line":29},[1031],{"type":48,"tag":150,"props":1032,"children":1033},{},[1034],{"type":53,"value":1035},"SELECT COUNT(*) AS total_transfers FROM transfers;\n",{"type":48,"tag":140,"props":1037,"children":1039},{"className":578,"code":1038,"language":580,"meta":144,"style":144},"# Check node liveness and start times (no node restarts mid-benchmark)\ncockroach node status --certs-dir=\u003Ccerts-dir>     # or --insecure for an insecure cluster\n",[1040],{"type":48,"tag":109,"props":1041,"children":1042},{"__ignoreMap":144},[1043,1051],{"type":48,"tag":150,"props":1044,"children":1045},{"class":152,"line":153},[1046],{"type":48,"tag":150,"props":1047,"children":1048},{"style":590},[1049],{"type":53,"value":1050},"# Check node liveness and start times (no node restarts mid-benchmark)\n",{"type":48,"tag":150,"props":1052,"children":1053},{"class":152,"line":29},[1054,1059,1064,1069,1074,1079,1084,1089],{"type":48,"tag":150,"props":1055,"children":1056},{"style":678},[1057],{"type":53,"value":1058},"cockroach",{"type":48,"tag":150,"props":1060,"children":1061},{"style":683},[1062],{"type":53,"value":1063}," node",{"type":48,"tag":150,"props":1065,"children":1066},{"style":683},[1067],{"type":53,"value":1068}," status",{"type":48,"tag":150,"props":1070,"children":1071},{"style":683},[1072],{"type":53,"value":1073}," --certs-dir=",{"type":48,"tag":150,"props":1075,"children":1076},{"style":739},[1077],{"type":53,"value":1078},"\u003C",{"type":48,"tag":150,"props":1080,"children":1081},{"style":683},[1082],{"type":53,"value":1083},"certs-dir",{"type":48,"tag":150,"props":1085,"children":1086},{"style":739},[1087],{"type":53,"value":1088},">",{"type":48,"tag":150,"props":1090,"children":1091},{"style":590},[1092],{"type":53,"value":1093},"     # or --insecure for an insecure cluster\n",{"type":48,"tag":90,"props":1095,"children":1097},{"id":1096},"benchmark-reference-results",[1098],{"type":53,"value":1099},"Benchmark Reference Results",{"type":48,"tag":56,"props":1101,"children":1102},{},[1103],{"type":53,"value":1104},"In a reported high-contention run comparing the two models:",{"type":48,"tag":884,"props":1106,"children":1107},{},[1108,1133],{"type":48,"tag":888,"props":1109,"children":1110},{},[1111],{"type":48,"tag":892,"props":1112,"children":1113},{},[1114,1118,1123,1128],{"type":48,"tag":896,"props":1115,"children":1116},{},[1117],{"type":53,"value":900},{"type":48,"tag":896,"props":1119,"children":1120},{},[1121],{"type":53,"value":1122},"Explicit",{"type":48,"tag":896,"props":1124,"children":1125},{},[1126],{"type":53,"value":1127},"CTE",{"type":48,"tag":896,"props":1129,"children":1130},{},[1131],{"type":53,"value":1132},"Change",{"type":48,"tag":907,"props":1134,"children":1135},{},[1136,1159,1182,1205],{"type":48,"tag":892,"props":1137,"children":1138},{},[1139,1144,1149,1154],{"type":48,"tag":914,"props":1140,"children":1141},{},[1142],{"type":53,"value":1143},"Throughput",{"type":48,"tag":914,"props":1145,"children":1146},{},[1147],{"type":53,"value":1148},"591.1 txn\u002Fs",{"type":48,"tag":914,"props":1150,"children":1151},{},[1152],{"type":53,"value":1153},"1,035.1 txn\u002Fs",{"type":48,"tag":914,"props":1155,"children":1156},{},[1157],{"type":53,"value":1158},"+75.1%",{"type":48,"tag":892,"props":1160,"children":1161},{},[1162,1167,1172,1177],{"type":48,"tag":914,"props":1163,"children":1164},{},[1165],{"type":53,"value":1166},"Wall time",{"type":48,"tag":914,"props":1168,"children":1169},{},[1170],{"type":53,"value":1171},"216.5s",{"type":48,"tag":914,"props":1173,"children":1174},{},[1175],{"type":53,"value":1176},"123.7s",{"type":48,"tag":914,"props":1178,"children":1179},{},[1180],{"type":53,"value":1181},"-42.9%",{"type":48,"tag":892,"props":1183,"children":1184},{},[1185,1190,1195,1200],{"type":48,"tag":914,"props":1186,"children":1187},{},[1188],{"type":53,"value":1189},"Average latency",{"type":48,"tag":914,"props":1191,"children":1192},{},[1193],{"type":53,"value":1194},"202.2 ms",{"type":48,"tag":914,"props":1196,"children":1197},{},[1198],{"type":53,"value":1199},"111.3 ms",{"type":48,"tag":914,"props":1201,"children":1202},{},[1203],{"type":53,"value":1204},"-45.0%",{"type":48,"tag":892,"props":1206,"children":1207},{},[1208,1212,1217,1222],{"type":48,"tag":914,"props":1209,"children":1210},{},[1211],{"type":53,"value":931},{"type":48,"tag":914,"props":1213,"children":1214},{},[1215],{"type":53,"value":1216},"2,270,977",{"type":48,"tag":914,"props":1218,"children":1219},{},[1220],{"type":53,"value":1221},"0",{"type":48,"tag":914,"props":1223,"children":1224},{},[1225],{"type":53,"value":1226},"-100%",{"type":48,"tag":56,"props":1228,"children":1229},{},[1230],{"type":53,"value":1231},"Extended runs preserved the same directional result at higher total volume, with the explicit model continuing to accumulate retries and occasional failures while the CTE model stayed at zero retries and zero failures.",{"type":48,"tag":133,"props":1233,"children":1235},{"id":1234},"impact-summary",[1236],{"type":53,"value":1237},"Impact Summary",{"type":48,"tag":884,"props":1239,"children":1240},{},[1241,1262],{"type":48,"tag":888,"props":1242,"children":1243},{},[1244],{"type":48,"tag":892,"props":1245,"children":1246},{},[1247,1252,1257],{"type":48,"tag":896,"props":1248,"children":1249},{},[1250],{"type":53,"value":1251},"Dimension",{"type":48,"tag":896,"props":1253,"children":1254},{},[1255],{"type":53,"value":1256},"Explicit Multi-Statement",{"type":48,"tag":896,"props":1258,"children":1259},{},[1260],{"type":53,"value":1261},"Single-Statement CTE",{"type":48,"tag":907,"props":1263,"children":1264},{},[1265,1283,1301,1319,1337,1355],{"type":48,"tag":892,"props":1266,"children":1267},{},[1268,1273,1278],{"type":48,"tag":914,"props":1269,"children":1270},{},[1271],{"type":53,"value":1272},"Round trips",{"type":48,"tag":914,"props":1274,"children":1275},{},[1276],{"type":53,"value":1277},"Multiple client\u002Fserver interactions",{"type":48,"tag":914,"props":1279,"children":1280},{},[1281],{"type":53,"value":1282},"Single request",{"type":48,"tag":892,"props":1284,"children":1285},{},[1286,1291,1296],{"type":48,"tag":914,"props":1287,"children":1288},{},[1289],{"type":53,"value":1290},"Transaction lifetime",{"type":48,"tag":914,"props":1292,"children":1293},{},[1294],{"type":53,"value":1295},"Longer",{"type":48,"tag":914,"props":1297,"children":1298},{},[1299],{"type":53,"value":1300},"Shorter",{"type":48,"tag":892,"props":1302,"children":1303},{},[1304,1309,1314],{"type":48,"tag":914,"props":1305,"children":1306},{},[1307],{"type":53,"value":1308},"Client retry complexity",{"type":48,"tag":914,"props":1310,"children":1311},{},[1312],{"type":53,"value":1313},"Higher",{"type":48,"tag":914,"props":1315,"children":1316},{},[1317],{"type":53,"value":1318},"Lower",{"type":48,"tag":892,"props":1320,"children":1321},{},[1322,1327,1332],{"type":48,"tag":914,"props":1323,"children":1324},{},[1325],{"type":53,"value":1326},"Atomic invariant enforcement",{"type":48,"tag":914,"props":1328,"children":1329},{},[1330],{"type":53,"value":1331},"Spread across statements\u002Fapp logic",{"type":48,"tag":914,"props":1333,"children":1334},{},[1335],{"type":53,"value":1336},"Contained in SQL",{"type":48,"tag":892,"props":1338,"children":1339},{},[1340,1345,1350],{"type":48,"tag":914,"props":1341,"children":1342},{},[1343],{"type":53,"value":1344},"Expected throughput",{"type":48,"tag":914,"props":1346,"children":1347},{},[1348],{"type":53,"value":1349},"Lower under contention",{"type":48,"tag":914,"props":1351,"children":1352},{},[1353],{"type":53,"value":1354},"Higher under contention",{"type":48,"tag":892,"props":1356,"children":1357},{},[1358,1363,1368],{"type":48,"tag":914,"props":1359,"children":1360},{},[1361],{"type":53,"value":1362},"Client-visible retries",{"type":48,"tag":914,"props":1364,"children":1365},{},[1366],{"type":53,"value":1367},"More likely",{"type":48,"tag":914,"props":1369,"children":1370},{},[1371],{"type":53,"value":1372},"Often reduced",{"type":48,"tag":90,"props":1374,"children":1376},{"id":1375},"decision-guidance",[1377],{"type":53,"value":1378},"Decision Guidance",{"type":48,"tag":133,"props":1380,"children":1382},{"id":1381},"prefer-the-explicit-pattern-when",[1383],{"type":53,"value":1384},"Prefer the Explicit Pattern When",{"type":48,"tag":1386,"props":1387,"children":1388},"ul",{},[1389,1395,1400],{"type":48,"tag":1390,"props":1391,"children":1392},"li",{},[1393],{"type":53,"value":1394},"The business workflow truly cannot be expressed cleanly in one SQL statement",{"type":48,"tag":1390,"props":1396,"children":1397},{},[1398],{"type":53,"value":1399},"Readability or staged business logic matters more than peak throughput",{"type":48,"tag":1390,"props":1401,"children":1402},{},[1403],{"type":53,"value":1404},"The contention level is low enough that retry amplification is not the dominant cost",{"type":48,"tag":133,"props":1406,"children":1408},{"id":1407},"prefer-the-cte-pattern-when",[1409],{"type":53,"value":1410},"Prefer the CTE Pattern When",{"type":48,"tag":1386,"props":1412,"children":1413},{},[1414,1419,1424,1429],{"type":48,"tag":1390,"props":1415,"children":1416},{},[1417],{"type":53,"value":1418},"The workflow is contention-heavy",{"type":48,"tag":1390,"props":1420,"children":1421},{},[1422],{"type":53,"value":1423},"The operation is naturally atomic",{"type":48,"tag":1390,"props":1425,"children":1426},{},[1427],{"type":53,"value":1428},"The application currently performs read-decide-write across multiple statements",{"type":48,"tag":1390,"props":1430,"children":1431},{},[1432],{"type":53,"value":1433},"The main goal is higher throughput, lower retries, and more stable p95\u002Fp99 latency",{"type":48,"tag":90,"props":1435,"children":1437},{"id":1436},"fair-benchmark-rules",[1438],{"type":53,"value":1439},"Fair Benchmark Rules",{"type":48,"tag":1441,"props":1442,"children":1443},"ol",{},[1444,1454,1464,1480,1490],{"type":48,"tag":1390,"props":1445,"children":1446},{},[1447,1452],{"type":48,"tag":65,"props":1448,"children":1449},{},[1450],{"type":53,"value":1451},"Reset between runs",{"type":53,"value":1453}," for fair comparison so balances, table size, and index size stay consistent",{"type":48,"tag":1390,"props":1455,"children":1456},{},[1457,1462],{"type":48,"tag":65,"props":1458,"children":1459},{},[1460],{"type":53,"value":1461},"Treat no-reset runs as a demo",{"type":53,"value":1463},", not an apples-to-apples benchmark",{"type":48,"tag":1390,"props":1465,"children":1466},{},[1467,1478],{"type":48,"tag":65,"props":1468,"children":1469},{},[1470,1472],{"type":53,"value":1471},"Use ",{"type":48,"tag":109,"props":1473,"children":1475},{"className":1474},[],[1476],{"type":53,"value":1477},"--batch-size=1",{"type":53,"value":1479}," when you want one business unit of work at a time for clean comparison",{"type":48,"tag":1390,"props":1481,"children":1482},{},[1483,1488],{"type":48,"tag":65,"props":1484,"children":1485},{},[1486],{"type":53,"value":1487},"Compare the right metrics",{"type":53,"value":1489}," — always include throughput, retries, p50, p95, p99, max latency, and failures",{"type":48,"tag":1390,"props":1491,"children":1492},{},[1493,1498],{"type":48,"tag":65,"props":1494,"children":1495},{},[1496],{"type":53,"value":1497},"Use multi-row UPSERT for seeding",{"type":53,"value":1499}," — single-row seeding distorts setup cost",{"type":48,"tag":90,"props":1501,"children":1503},{"id":1502},"common-misconceptions",[1504],{"type":53,"value":1505},"Common Misconceptions",{"type":48,"tag":1386,"props":1507,"children":1508},{},[1509,1519,1529],{"type":48,"tag":1390,"props":1510,"children":1511},{},[1512,1517],{"type":48,"tag":65,"props":1513,"children":1514},{},[1515],{"type":53,"value":1516},"\"CTE always wins\"",{"type":53,"value":1518}," — Only when the workflow is contention-sensitive and expressible as a single atomic statement.",{"type":48,"tag":1390,"props":1520,"children":1521},{},[1522,1527],{"type":48,"tag":65,"props":1523,"children":1524},{},[1525],{"type":53,"value":1526},"\"SQL Activity showing waiting means CTE failed\"",{"type":53,"value":1528}," — CTE reduces but does not eliminate contention. Compare throughput, tail latency, and retry profile.",{"type":48,"tag":1390,"props":1530,"children":1531},{},[1532,1537],{"type":48,"tag":65,"props":1533,"children":1534},{},[1535],{"type":53,"value":1536},"\"Single-statement means no contention\"",{"type":53,"value":1538}," — CTE narrows the contention window but does not eliminate it.",{"type":48,"tag":90,"props":1540,"children":1542},{"id":1541},"safety-considerations",[1543],{"type":53,"value":1544},"Safety Considerations",{"type":48,"tag":1386,"props":1546,"children":1547},{},[1548,1553,1558,1563,1568],{"type":48,"tag":1390,"props":1549,"children":1550},{},[1551],{"type":53,"value":1552},"Run benchmarks on dedicated test clusters, not production",{"type":48,"tag":1390,"props":1554,"children":1555},{},[1556],{"type":53,"value":1557},"Reset data between runs for fair comparison",{"type":48,"tag":1390,"props":1559,"children":1560},{},[1561],{"type":53,"value":1562},"Monitor cluster health during benchmark execution",{"type":48,"tag":1390,"props":1564,"children":1565},{},[1566],{"type":53,"value":1567},"Use realistic but not destructive concurrency levels",{"type":48,"tag":1390,"props":1569,"children":1570},{},[1571],{"type":53,"value":1572},"Validate that benchmark results transfer to your specific workload before making production changes",{"type":48,"tag":90,"props":1574,"children":1576},{"id":1575},"references",[1577],{"type":53,"value":1578},"References",{"type":48,"tag":1386,"props":1580,"children":1581},{},[1582,1593,1603,1613,1623,1633,1643,1653,1663],{"type":48,"tag":1390,"props":1583,"children":1584},{},[1585],{"type":48,"tag":73,"props":1586,"children":1590},{"href":1587,"rel":1588},"https:\u002F\u002Fwww.cockroachlabs.com\u002Fdocs\u002Fstable\u002Ftransactions",[1589],"nofollow",[1591],{"type":53,"value":1592},"CockroachDB Transactions Documentation",{"type":48,"tag":1390,"props":1594,"children":1595},{},[1596],{"type":48,"tag":73,"props":1597,"children":1600},{"href":1598,"rel":1599},"https:\u002F\u002Fwww.cockroachlabs.com\u002Fdocs\u002Fstable\u002Fadvanced-client-side-transaction-retries",[1589],[1601],{"type":53,"value":1602},"Advanced Client-Side Transaction Retries",{"type":48,"tag":1390,"props":1604,"children":1605},{},[1606],{"type":48,"tag":73,"props":1607,"children":1610},{"href":1608,"rel":1609},"https:\u002F\u002Fwww.cockroachlabs.com\u002Fdocs\u002Fstable\u002Fperformance-best-practices-overview",[1589],[1611],{"type":53,"value":1612},"Performance Best Practices",{"type":48,"tag":1390,"props":1614,"children":1615},{},[1616],{"type":48,"tag":73,"props":1617,"children":1620},{"href":1618,"rel":1619},"https:\u002F\u002Fandrewdeally.medium.com\u002Fcomparing-multi-statement-vs-single-statement-transactions-for-account-transfers-in-sql-09190b116e64",[1589],[1621],{"type":53,"value":1622},"Comparing Multi-Statement vs Single-Statement Transactions",{"type":48,"tag":1390,"props":1624,"children":1625},{},[1626],{"type":48,"tag":73,"props":1627,"children":1630},{"href":1628,"rel":1629},"https:\u002F\u002Fandrewdeally.medium.com\u002Fset-based-operations-with-cockroachdb-c9f371992dc7",[1589],[1631],{"type":53,"value":1632},"Set-Based Operations with CockroachDB",{"type":48,"tag":1390,"props":1634,"children":1635},{},[1636],{"type":48,"tag":73,"props":1637,"children":1640},{"href":1638,"rel":1639},"https:\u002F\u002Fwww.mindfulchase.com\u002Fexplore\u002Ftroubleshooting-tips\u002Fdatabases\u002Fdeep-dive-into-transaction-retry-failures-in-cockroachdb-root-causes-and-fixes.html",[1589],[1641],{"type":53,"value":1642},"Deep Dive into Transaction Retry Failures",{"type":48,"tag":1390,"props":1644,"children":1645},{},[1646],{"type":48,"tag":73,"props":1647,"children":1650},{"href":1648,"rel":1649},"https:\u002F\u002Fwww.mindfulchase.com\u002Fexplore\u002Ftroubleshooting-tips\u002Fdatabases\u002Ftroubleshooting-cockroachdb-performance-in-enterprise-deployments.html",[1589],[1651],{"type":53,"value":1652},"Troubleshooting CockroachDB Performance",{"type":48,"tag":1390,"props":1654,"children":1655},{},[1656],{"type":48,"tag":73,"props":1657,"children":1660},{"href":1658,"rel":1659},"https:\u002F\u002Fgithub.com\u002Fcockroachdb\u002Fcockroach-transaction-demo",[1589],[1661],{"type":53,"value":1662},"CockroachDB Transaction Demo",{"type":48,"tag":1390,"props":1664,"children":1665},{},[1666,1673],{"type":48,"tag":73,"props":1667,"children":1670},{"href":1668,"rel":1669},"https:\u002F\u002Fgithub.com\u002Fviragtripathi\u002Fcockroachdb-best-practices-demo",[1589],[1671],{"type":53,"value":1672},"CockroachDB Best Practices & Anti-Patterns Demo",{"type":53,"value":1674}," -- Demos 1-2 show retry patterns and contention scaling under concurrency",{"type":48,"tag":1676,"props":1677,"children":1678},"style",{},[1679],{"type":53,"value":1680},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1682,"total":1767},[1683,1695,1708,1725,1738,1751,1758],{"slug":1684,"name":1684,"fn":1685,"description":1686,"org":1687,"tags":1688,"stars":25,"repoUrl":26,"updatedAt":1694},"analyzing-range-distribution","analyze CockroachDB range distribution and health","Analyzes CockroachDB range distribution across tables and indexes using SHOW RANGES to identify range count, size patterns, leaseholder placement, and replication health. Use when investigating hotspots, uneven data distribution, range fragmentation, or validating zone configuration effects without DB Console access.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1689,1690,1693],{"name":17,"slug":18,"type":15},{"name":1691,"slug":1692,"type":15},"Monitoring","monitoring",{"name":13,"slug":14,"type":15},"2026-07-12T07:57:18.753533",{"slug":1696,"name":1696,"fn":1697,"description":1698,"org":1699,"tags":1700,"stars":25,"repoUrl":26,"updatedAt":1707},"analyzing-schema-change-storage-risk","analyze schema change storage requirements","Estimates storage requirements for CockroachDB online schema change backfills using SHOW RANGES WITH DETAILS, KEYS, INDEXES. Use before CREATE INDEX, ADD COLUMN with INDEX\u002FUNIQUE, ALTER PRIMARY KEY, CREATE MATERIALIZED VIEW, CREATE TABLE AS, REFRESH, or SET LOCALITY on tables with large per-index footprints, to avoid mid-backfill disk exhaustion.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1701,1704,1705,1706],{"name":1702,"slug":1703,"type":15},"Data Modeling","data-modeling",{"name":17,"slug":18,"type":15},{"name":13,"slug":14,"type":15},{"name":23,"slug":24,"type":15},"2026-07-12T07:57:22.763788",{"slug":1709,"name":1709,"fn":1710,"description":1711,"org":1712,"tags":1713,"stars":25,"repoUrl":26,"updatedAt":1724},"auditing-cis-benchmark","audit CockroachDB clusters against CIS benchmarks","Audits a self-hosted CockroachDB cluster against the CIS CockroachDB Benchmark v1.0.0 Level 1 controls. Supports two audit depths — quick automated scans and full CIS audit procedures. Produces a structured PASS\u002FFAIL\u002FMANUAL report covering installation, system hardening, logging, user access, data protection, and CockroachDB settings. Use when preparing for CIS compliance assessments, hardening self-hosted deployments, or validating security posture against industry benchmarks.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1714,1717,1720,1721],{"name":1715,"slug":1716,"type":15},"Audit","audit",{"name":1718,"slug":1719,"type":15},"Compliance","compliance",{"name":17,"slug":18,"type":15},{"name":1722,"slug":1723,"type":15},"Security","security","2026-07-18T05:48:00.862384",{"slug":1726,"name":1726,"fn":1727,"description":1728,"org":1729,"tags":1730,"stars":25,"repoUrl":26,"updatedAt":1737},"auditing-cloud-cluster-security","audit CockroachDB cluster security posture","Audits the security posture of a CockroachDB cluster (Cloud or self-hosted) across network, authentication, authorization, encryption, audit logging, and backup dimensions. Use when assessing cluster security readiness, preparing for compliance reviews, or investigating security configuration gaps.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1731,1732,1733,1736],{"name":1715,"slug":1716,"type":15},{"name":17,"slug":18,"type":15},{"name":1734,"slug":1735,"type":15},"Operations","operations",{"name":1722,"slug":1723,"type":15},"2026-07-12T07:57:01.506735",{"slug":1739,"name":1739,"fn":1740,"description":1741,"org":1742,"tags":1743,"stars":25,"repoUrl":26,"updatedAt":1750},"auditing-table-statistics","audit optimizer table statistics","Audits optimizer table statistics for staleness, missing coverage, and data quality issues using SHOW STATISTICS. Use when diagnosing poor query performance, unexpected plan changes, or after bulk data changes to identify stale statistics requiring refresh via CREATE STATISTICS.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1744,1745,1748,1749],{"name":1715,"slug":1716,"type":15},{"name":1746,"slug":1747,"type":15},"Data Analysis","data-analysis",{"name":17,"slug":18,"type":15},{"name":13,"slug":14,"type":15},"2026-07-12T07:57:16.190081",{"slug":4,"name":4,"fn":5,"description":6,"org":1752,"tags":1753,"stars":25,"repoUrl":26,"updatedAt":27},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1754,1755,1756,1757],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"name":23,"slug":24,"type":15},{"slug":86,"name":86,"fn":1759,"description":1760,"org":1761,"tags":1762,"stars":25,"repoUrl":26,"updatedAt":1766},"write and optimize CockroachDB SQL","Use when writing, generating, or optimizing SQL for CockroachDB, designing CockroachDB schemas, or when the user asks about CockroachDB-specific SQL patterns, type mappings, and distributed database best practices. Also use when encountering CockroachDB anti-patterns like missing primary keys, sequential ID hotspots, or incorrect type usage.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1763,1764,1765],{"name":17,"slug":18,"type":15},{"name":13,"slug":14,"type":15},{"name":23,"slug":24,"type":15},"2026-07-25T05:31:22.562808",34,{"items":1769,"total":1889},[1770,1787,1801,1816,1827,1837,1848,1854,1861,1868,1875,1882],{"slug":1771,"name":1771,"fn":1772,"description":1773,"org":1774,"tags":1775,"stars":1784,"repoUrl":1785,"updatedAt":1786},"collecting-cockroachdb-operator-escalation-packet","collect CockroachDB operator escalation packets","Collects a complete CockroachDB Operator escalation packet for TSC\u002FTSE or operator-team handoff, including Helm state, Kubernetes resources, logs, operation-specific evidence, pprof goroutine dumps, metrics, and a customer action timeline. Use when general diagnosis cannot resolve an operator-managed CockroachDB Helm issue or before restarting a stuck operator.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1776,1777,1780,1783],{"name":17,"slug":18,"type":15},{"name":1778,"slug":1779,"type":15},"Incident Response","incident-response",{"name":1781,"slug":1782,"type":15},"Kubernetes","kubernetes",{"name":1691,"slug":1692,"type":15},105,"https:\u002F\u002Fgithub.com\u002Fcockroachdb\u002Fhelm-charts","2026-07-12T07:57:25.288146",{"slug":1788,"name":1788,"fn":1789,"description":1790,"org":1791,"tags":1792,"stars":1784,"repoUrl":1785,"updatedAt":1800},"configuring-cockroachdb-helm-tls","configure TLS for CockroachDB Helm charts","Selects and validates TLS settings for CockroachDB Helm chart deployments, including self-signer, cert-manager, and external certificate modes. Use when a customer needs secure CockroachDB Helm values, certificate secret mapping, cert-manager integration, or TLS install troubleshooting before deploying the chart.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1793,1796,1799],{"name":1794,"slug":1795,"type":15},"Deployment","deployment",{"name":1797,"slug":1798,"type":15},"Encryption","encryption",{"name":1722,"slug":1723,"type":15},"2026-07-12T07:56:37.675396",{"slug":1802,"name":1802,"fn":1803,"description":1804,"org":1805,"tags":1806,"stars":1784,"repoUrl":1785,"updatedAt":1815},"debugging-cockroachdb-operator-migrations","debug CockroachDB Operator migration scenarios","Debugs CockroachDB Operator migration scenarios, including Helm StatefulSet to v1beta1 CrdbNode migration and public operator v1alpha1 to v1beta1 migration. Use when migration labels, migration phases, source StatefulSet ownership, converted CRDs, PVC ownership, or post-migration reconciliation are unclear or stuck.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1807,1808,1811,1812],{"name":17,"slug":18,"type":15},{"name":1809,"slug":1810,"type":15},"Debugging","debugging",{"name":1781,"slug":1782,"type":15},{"name":1813,"slug":1814,"type":15},"Migration","migration","2026-07-12T07:56:48.360871",{"slug":1817,"name":1817,"fn":1818,"description":1819,"org":1820,"tags":1821,"stars":1784,"repoUrl":1785,"updatedAt":1826},"diagnosing-cockroachdb-helm-deployments","diagnose CockroachDB Helm chart deployments","Diagnoses failed or unhealthy CockroachDB Helm chart deployments by checking Helm release state, operator health, CrdbCluster and CrdbNode status, pod readiness, RBAC, webhooks, TLS, upgrades, scaling, PVCs, DNS, and multi-region assumptions. Use when Helm install or upgrade fails, pods are not Ready, or the operator is not reconciling.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1822,1823,1824,1825],{"name":17,"slug":18,"type":15},{"name":1809,"slug":1810,"type":15},{"name":1794,"slug":1795,"type":15},{"name":1781,"slug":1782,"type":15},"2026-07-12T07:57:24.018818",{"slug":1828,"name":1828,"fn":1829,"description":1830,"org":1831,"tags":1832,"stars":1784,"repoUrl":1785,"updatedAt":1836},"installing-cockroachdb-with-helm","install CockroachDB using Helm","Guides customer-facing installation of CockroachDB on Kubernetes using the CockroachDB split Helm charts and operator-managed v1beta1 resources. Use when installing CockroachDB with Helm, choosing between published and local split charts, verifying a new install, or helping an agent complete first-time Kubernetes onboarding.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1833,1834,1835],{"name":17,"slug":18,"type":15},{"name":1794,"slug":1795,"type":15},{"name":1781,"slug":1782,"type":15},"2026-07-12T07:56:45.777567",{"slug":1838,"name":1838,"fn":1839,"description":1840,"org":1841,"tags":1842,"stars":1784,"repoUrl":1785,"updatedAt":1847},"validating-cockroachdb-helm-multiregion","validate CockroachDB multi-region Helm deployments","Validates CockroachDB Helm chart values and Kubernetes prerequisites for operator-managed multi-region deployments. Use before adding a region, deploying CockroachDB across multiple Kubernetes clusters, checking region DNS domains, or confirming that all regions share certificate and networking assumptions.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1843,1844,1845,1846],{"name":17,"slug":18,"type":15},{"name":1794,"slug":1795,"type":15},{"name":1781,"slug":1782,"type":15},{"name":1734,"slug":1735,"type":15},"2026-07-12T07:56:47.082609",{"slug":1684,"name":1684,"fn":1685,"description":1686,"org":1849,"tags":1850,"stars":25,"repoUrl":26,"updatedAt":1694},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1851,1852,1853],{"name":17,"slug":18,"type":15},{"name":1691,"slug":1692,"type":15},{"name":13,"slug":14,"type":15},{"slug":1696,"name":1696,"fn":1697,"description":1698,"org":1855,"tags":1856,"stars":25,"repoUrl":26,"updatedAt":1707},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1857,1858,1859,1860],{"name":1702,"slug":1703,"type":15},{"name":17,"slug":18,"type":15},{"name":13,"slug":14,"type":15},{"name":23,"slug":24,"type":15},{"slug":1709,"name":1709,"fn":1710,"description":1711,"org":1862,"tags":1863,"stars":25,"repoUrl":26,"updatedAt":1724},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1864,1865,1866,1867],{"name":1715,"slug":1716,"type":15},{"name":1718,"slug":1719,"type":15},{"name":17,"slug":18,"type":15},{"name":1722,"slug":1723,"type":15},{"slug":1726,"name":1726,"fn":1727,"description":1728,"org":1869,"tags":1870,"stars":25,"repoUrl":26,"updatedAt":1737},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1871,1872,1873,1874],{"name":1715,"slug":1716,"type":15},{"name":17,"slug":18,"type":15},{"name":1734,"slug":1735,"type":15},{"name":1722,"slug":1723,"type":15},{"slug":1739,"name":1739,"fn":1740,"description":1741,"org":1876,"tags":1877,"stars":25,"repoUrl":26,"updatedAt":1750},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1878,1879,1880,1881],{"name":1715,"slug":1716,"type":15},{"name":1746,"slug":1747,"type":15},{"name":17,"slug":18,"type":15},{"name":13,"slug":14,"type":15},{"slug":4,"name":4,"fn":5,"description":6,"org":1883,"tags":1884,"stars":25,"repoUrl":26,"updatedAt":27},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1885,1886,1887,1888],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"name":23,"slug":24,"type":15},40]