[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-cockroachdb-analyzing-schema-change-storage-risk":3,"mdc--ck58u4-key":39,"related-org-cockroachdb-analyzing-schema-change-storage-risk":925,"related-repo-cockroachdb-analyzing-schema-change-storage-risk":1080},{"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},"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},"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},"Data Modeling","data-modeling",{"name":23,"slug":24,"type":15},"SQL","sql",3,"https:\u002F\u002Fgithub.com\u002Fcockroachdb\u002Fclaude-plugin","2026-07-12T07:57:22.763788",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-observability-and-diagnostics\u002Fanalyzing-schema-change-storage-risk","---\nname: analyzing-schema-change-storage-risk\ndescription: 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.\ncompatibility: Requires SQL access. SHOW RANGES WITH DETAILS computes span_stats on demand and is expensive on tables with many ranges; target specific tables. Mirrors official guidance at https:\u002F\u002Fwww.cockroachlabs.com\u002Fdocs\u002Fstable\u002Fonline-schema-changes#estimate-your-storage-capacity-before-performing-online-schema-changes.\nmetadata:\n  author: cockroachdb\n  version: \"2.0\"\n---\n\n# Analyzing Schema Change Storage Risk\n\nEstimates the storage headroom needed to safely run online schema changes.\nMirrors the [official guidance](https:\u002F\u002Fwww.cockroachlabs.com\u002Fdocs\u002Fstable\u002Fonline-schema-changes#estimate-your-storage-capacity-before-performing-online-schema-changes):\nsome operations may temporarily require up to **3× the size of the affected\ntable or index** while the schema change is in flight.\n\nFor ongoing range-distribution monitoring, see\n[analyzing-range-distribution](..\u002Fanalyzing-range-distribution\u002FSKILL.md).\n\n## When to Use This Skill\n\nRun a quick estimate before issuing any of these operations on a table whose\nindexes are large (multiple GB per index, or many ranges per index):\n\n- `CREATE INDEX`\n- `ADD COLUMN` with `INDEX` or `UNIQUE`\n- `ALTER PRIMARY KEY`\n- `CREATE MATERIALIZED VIEW`\n- `CREATE TABLE AS`\n- `REFRESH MATERIALIZED VIEW`\n- `ALTER TABLE ... SET LOCALITY` (when the locality change rewrites data)\n\nTables whose indexes are small (kilobytes to a few megabytes) carry trivial\nstorage risk; estimation is unnecessary.\n\n## Background\n\n### How much temporary space does a backfill actually need?\n\nThe honest answer depends on the operation:\n\n- **`CREATE INDEX` \u002F `ADD COLUMN ... UNIQUE`**: needs roughly **1× the size of\n  the new index** — the indexed columns plus the primary key columns, written\n  into a fresh index span. This is typically a small fraction of the table.\n  Worst-case headroom is bounded by the size of that one index.\n- **`ALTER PRIMARY KEY`**: rewrites the primary index and any secondary indexes\n  whose definitions depend on the old PK. Old data sticks around until GC, so\n  peak on-disk usage during the change can approach the size of the table again.\n- **All bulk-ingest backfills**: extra MVCC versions and pre-compaction SSTs\n  add overhead until Pebble compacts and GC runs.\n\nThe official docs round these up into a single conservative recommendation:\nplan for up to **3× the size of the affected table or index** as free space.\nThat figure is a safety bound, not a precise prediction. For most\n`CREATE INDEX` operations the real cost is much smaller; for\n`ALTER PRIMARY KEY` on a large table it is the right ballpark.\n\n### What happens if the cluster runs out of disk mid-backfill?\n\nBackfills bulk-ingest data via `AddSSTable`, which checks the per-store\nremaining capacity before each ingestion. If the remaining fraction falls\nbelow `kv.bulk_io_write.min_capacity_remaining_fraction` (default `0.05`,\ni.e. 5%), the ingest is rejected with `InsufficientSpaceError`. Both the\nlegacy and declarative schema changers translate that error into a job pause\nrequest, so the schema change halts rather than wedging the cluster. To\nresume, free space (e.g. drop unused indexes, expand storage) and resume the\npaused job.\n\nThis is a *reactive* safety net, not a planning tool — by the time it fires,\nforeground writes on the affected store may already be unhealthy.\n\n## Estimating Capacity\n\n### Step 1 — Check free space per store\n\nThe minimum free space across stores is what bounds the schema change, not the\ntotal cluster free space (replicas are spread across nodes).\n\nNo production-safe SQL view exposes per-store capacity. Use the DB Console\n**Overview** → **Storage** page (sorts per-store usage), or scrape the\nper-node Prometheus endpoint and look at the smallest `capacity_available`:\n\n```bash\ncurl -ks https:\u002F\u002F\u003Cnode>:8080\u002F_status\u002Fvars | grep -E '^capacity( |_used|_available)'\n```\n\n### Step 2 — Estimate the affected table\u002Findex size\n\nUse the docs-recommended form of `SHOW RANGES`:\n\n```sql\nSHOW RANGES FROM TABLE \u003Ctable> WITH DETAILS, KEYS, INDEXES;\n```\n\nThe output includes one row per range, with `range_size_mb` and `index_name`.\nAggregate by index for the per-index totals that matter for capacity planning:\n\n```sql\nWITH r AS (SHOW RANGES FROM TABLE \u003Ctable> WITH DETAILS, KEYS, INDEXES)\nSELECT\n  index_name,\n  COUNT(*)                              AS range_count,\n  ROUND(SUM(range_size_mb), 2)          AS index_size_mb,\n  ROUND(SUM(range_size_mb) \u002F 1024, 2)   AS index_size_gb\nFROM r\nGROUP BY index_name\nORDER BY index_size_mb DESC;\n```\n\n### Step 3 — Compare against the operation\n\n| Operation                                   | Conservative free-space target (per store)                                  |\n|---------------------------------------------|-----------------------------------------------------------------------------|\n| `CREATE INDEX` \u002F `ADD COLUMN ... UNIQUE`    | Up to 3× the size of the *new* index (its indexed + PK columns).            |\n| `ALTER PRIMARY KEY`                          | Up to 3× the size of the *table* (sum of the relevant indexes from step 2). |\n| `CREATE MATERIALIZED VIEW` \u002F `CREATE TABLE AS` | Up to 3× the expected size of the materialized result.                   |\n\nThe new index does not exist yet, so estimate it from a comparable existing\nindex (e.g. one on similarly typed columns) or from the source columns'\ncontribution to the primary index.\n\nIf the smallest free-space figure from step 1 is well above the target, the\noperation is safe to run. If it is close, free space first (drop unused\nindexes, expand storage) before issuing the DDL.\n\n## Operational Notes\n\n- **`SHOW RANGES ... WITH DETAILS` is expensive.** It computes span statistics\n  on demand. Always target a specific table, never run it cluster-wide, and\n  prefer maintenance windows on tables with thousands of ranges.\n- **Watch the job, not just disk.** If a backfill pauses with\n  `InsufficientSpaceError`, free disk on the affected store and resume the\n  paused schema change job. Check with:\n  ```sql\n  WITH j AS (SHOW JOBS)\n  SELECT job_id, status, error\n  FROM j\n  WHERE job_type = 'SCHEMA CHANGE' AND status = 'paused';\n  ```\n- **Drop unused indexes first.** Often the cheapest way to free headroom\n  before a large backfill is to drop indexes that\n  `crdb_internal.index_usage_statistics` shows are unused (this is one of the\n  12 production-safe `crdb_internal` views, per the\n  [docs](https:\u002F\u002Fwww.cockroachlabs.com\u002Fdocs\u002Fstable\u002Fcrdb-internal)).\n- **Statistics lag.** `range_size_mb` is approximate and can lag actual disk\n  usage; treat estimates as conservative ballparks, not exact figures.\n\n## References\n\n- [Online Schema Changes — Estimate your storage capacity](https:\u002F\u002Fwww.cockroachlabs.com\u002Fdocs\u002Fstable\u002Fonline-schema-changes#estimate-your-storage-capacity-before-performing-online-schema-changes)\n- [SHOW RANGES](https:\u002F\u002Fwww.cockroachlabs.com\u002Fdocs\u002Fstable\u002Fshow-ranges.html)\n\n## Related Skills\n\n- [analyzing-range-distribution](..\u002Fanalyzing-range-distribution\u002FSKILL.md) — range count, leaseholder placement, fragmentation\n",{"data":40,"body":44},{"name":4,"description":6,"compatibility":41,"metadata":42},"Requires SQL access. SHOW RANGES WITH DETAILS computes span_stats on demand and is expensive on tables with many ranges; target specific tables. Mirrors official guidance at https:\u002F\u002Fwww.cockroachlabs.com\u002Fdocs\u002Fstable\u002Fonline-schema-changes#estimate-your-storage-capacity-before-performing-online-schema-changes.",{"author":8,"version":43},"2.0",{"type":45,"children":46},"root",[47,55,80,93,100,105,192,197,203,210,215,269,295,301,338,351,357,363,368,395,486,492,504,519,540,625,631,731,736,741,747,874,880,901,907,919],{"type":48,"tag":49,"props":50,"children":51},"element","h1",{"id":4},[52],{"type":53,"value":54},"text","Analyzing Schema Change Storage Risk",{"type":48,"tag":56,"props":57,"children":58},"p",{},[59,61,70,72,78],{"type":53,"value":60},"Estimates the storage headroom needed to safely run online schema changes.\nMirrors the ",{"type":48,"tag":62,"props":63,"children":67},"a",{"href":64,"rel":65},"https:\u002F\u002Fwww.cockroachlabs.com\u002Fdocs\u002Fstable\u002Fonline-schema-changes#estimate-your-storage-capacity-before-performing-online-schema-changes",[66],"nofollow",[68],{"type":53,"value":69},"official guidance",{"type":53,"value":71},":\nsome operations may temporarily require up to ",{"type":48,"tag":73,"props":74,"children":75},"strong",{},[76],{"type":53,"value":77},"3× the size of the affected\ntable or index",{"type":53,"value":79}," while the schema change is in flight.",{"type":48,"tag":56,"props":81,"children":82},{},[83,85,91],{"type":53,"value":84},"For ongoing range-distribution monitoring, see\n",{"type":48,"tag":62,"props":86,"children":88},{"href":87},"..\u002Fanalyzing-range-distribution\u002FSKILL.md",[89],{"type":53,"value":90},"analyzing-range-distribution",{"type":53,"value":92},".",{"type":48,"tag":94,"props":95,"children":97},"h2",{"id":96},"when-to-use-this-skill",[98],{"type":53,"value":99},"When to Use This Skill",{"type":48,"tag":56,"props":101,"children":102},{},[103],{"type":53,"value":104},"Run a quick estimate before issuing any of these operations on a table whose\nindexes are large (multiple GB per index, or many ranges per index):",{"type":48,"tag":106,"props":107,"children":108},"ul",{},[109,120,145,154,163,172,181],{"type":48,"tag":110,"props":111,"children":112},"li",{},[113],{"type":48,"tag":114,"props":115,"children":117},"code",{"className":116},[],[118],{"type":53,"value":119},"CREATE INDEX",{"type":48,"tag":110,"props":121,"children":122},{},[123,129,131,137,139],{"type":48,"tag":114,"props":124,"children":126},{"className":125},[],[127],{"type":53,"value":128},"ADD COLUMN",{"type":53,"value":130}," with ",{"type":48,"tag":114,"props":132,"children":134},{"className":133},[],[135],{"type":53,"value":136},"INDEX",{"type":53,"value":138}," or ",{"type":48,"tag":114,"props":140,"children":142},{"className":141},[],[143],{"type":53,"value":144},"UNIQUE",{"type":48,"tag":110,"props":146,"children":147},{},[148],{"type":48,"tag":114,"props":149,"children":151},{"className":150},[],[152],{"type":53,"value":153},"ALTER PRIMARY KEY",{"type":48,"tag":110,"props":155,"children":156},{},[157],{"type":48,"tag":114,"props":158,"children":160},{"className":159},[],[161],{"type":53,"value":162},"CREATE MATERIALIZED VIEW",{"type":48,"tag":110,"props":164,"children":165},{},[166],{"type":48,"tag":114,"props":167,"children":169},{"className":168},[],[170],{"type":53,"value":171},"CREATE TABLE AS",{"type":48,"tag":110,"props":173,"children":174},{},[175],{"type":48,"tag":114,"props":176,"children":178},{"className":177},[],[179],{"type":53,"value":180},"REFRESH MATERIALIZED VIEW",{"type":48,"tag":110,"props":182,"children":183},{},[184,190],{"type":48,"tag":114,"props":185,"children":187},{"className":186},[],[188],{"type":53,"value":189},"ALTER TABLE ... SET LOCALITY",{"type":53,"value":191}," (when the locality change rewrites data)",{"type":48,"tag":56,"props":193,"children":194},{},[195],{"type":53,"value":196},"Tables whose indexes are small (kilobytes to a few megabytes) carry trivial\nstorage risk; estimation is unnecessary.",{"type":48,"tag":94,"props":198,"children":200},{"id":199},"background",[201],{"type":53,"value":202},"Background",{"type":48,"tag":204,"props":205,"children":207},"h3",{"id":206},"how-much-temporary-space-does-a-backfill-actually-need",[208],{"type":53,"value":209},"How much temporary space does a backfill actually need?",{"type":48,"tag":56,"props":211,"children":212},{},[213],{"type":53,"value":214},"The honest answer depends on the operation:",{"type":48,"tag":106,"props":216,"children":217},{},[218,246,259],{"type":48,"tag":110,"props":219,"children":220},{},[221,237,239,244],{"type":48,"tag":73,"props":222,"children":223},{},[224,229,231],{"type":48,"tag":114,"props":225,"children":227},{"className":226},[],[228],{"type":53,"value":119},{"type":53,"value":230}," \u002F ",{"type":48,"tag":114,"props":232,"children":234},{"className":233},[],[235],{"type":53,"value":236},"ADD COLUMN ... UNIQUE",{"type":53,"value":238},": needs roughly ",{"type":48,"tag":73,"props":240,"children":241},{},[242],{"type":53,"value":243},"1× the size of\nthe new index",{"type":53,"value":245}," — the indexed columns plus the primary key columns, written\ninto a fresh index span. This is typically a small fraction of the table.\nWorst-case headroom is bounded by the size of that one index.",{"type":48,"tag":110,"props":247,"children":248},{},[249,257],{"type":48,"tag":73,"props":250,"children":251},{},[252],{"type":48,"tag":114,"props":253,"children":255},{"className":254},[],[256],{"type":53,"value":153},{"type":53,"value":258},": rewrites the primary index and any secondary indexes\nwhose definitions depend on the old PK. Old data sticks around until GC, so\npeak on-disk usage during the change can approach the size of the table again.",{"type":48,"tag":110,"props":260,"children":261},{},[262,267],{"type":48,"tag":73,"props":263,"children":264},{},[265],{"type":53,"value":266},"All bulk-ingest backfills",{"type":53,"value":268},": extra MVCC versions and pre-compaction SSTs\nadd overhead until Pebble compacts and GC runs.",{"type":48,"tag":56,"props":270,"children":271},{},[272,274,279,281,286,288,293],{"type":53,"value":273},"The official docs round these up into a single conservative recommendation:\nplan for up to ",{"type":48,"tag":73,"props":275,"children":276},{},[277],{"type":53,"value":278},"3× the size of the affected table or index",{"type":53,"value":280}," as free space.\nThat figure is a safety bound, not a precise prediction. For most\n",{"type":48,"tag":114,"props":282,"children":284},{"className":283},[],[285],{"type":53,"value":119},{"type":53,"value":287}," operations the real cost is much smaller; for\n",{"type":48,"tag":114,"props":289,"children":291},{"className":290},[],[292],{"type":53,"value":153},{"type":53,"value":294}," on a large table it is the right ballpark.",{"type":48,"tag":204,"props":296,"children":298},{"id":297},"what-happens-if-the-cluster-runs-out-of-disk-mid-backfill",[299],{"type":53,"value":300},"What happens if the cluster runs out of disk mid-backfill?",{"type":48,"tag":56,"props":302,"children":303},{},[304,306,312,314,320,322,328,330,336],{"type":53,"value":305},"Backfills bulk-ingest data via ",{"type":48,"tag":114,"props":307,"children":309},{"className":308},[],[310],{"type":53,"value":311},"AddSSTable",{"type":53,"value":313},", which checks the per-store\nremaining capacity before each ingestion. If the remaining fraction falls\nbelow ",{"type":48,"tag":114,"props":315,"children":317},{"className":316},[],[318],{"type":53,"value":319},"kv.bulk_io_write.min_capacity_remaining_fraction",{"type":53,"value":321}," (default ",{"type":48,"tag":114,"props":323,"children":325},{"className":324},[],[326],{"type":53,"value":327},"0.05",{"type":53,"value":329},",\ni.e. 5%), the ingest is rejected with ",{"type":48,"tag":114,"props":331,"children":333},{"className":332},[],[334],{"type":53,"value":335},"InsufficientSpaceError",{"type":53,"value":337},". Both the\nlegacy and declarative schema changers translate that error into a job pause\nrequest, so the schema change halts rather than wedging the cluster. To\nresume, free space (e.g. drop unused indexes, expand storage) and resume the\npaused job.",{"type":48,"tag":56,"props":339,"children":340},{},[341,343,349],{"type":53,"value":342},"This is a ",{"type":48,"tag":344,"props":345,"children":346},"em",{},[347],{"type":53,"value":348},"reactive",{"type":53,"value":350}," safety net, not a planning tool — by the time it fires,\nforeground writes on the affected store may already be unhealthy.",{"type":48,"tag":94,"props":352,"children":354},{"id":353},"estimating-capacity",[355],{"type":53,"value":356},"Estimating Capacity",{"type":48,"tag":204,"props":358,"children":360},{"id":359},"step-1-check-free-space-per-store",[361],{"type":53,"value":362},"Step 1 — Check free space per store",{"type":48,"tag":56,"props":364,"children":365},{},[366],{"type":53,"value":367},"The minimum free space across stores is what bounds the schema change, not the\ntotal cluster free space (replicas are spread across nodes).",{"type":48,"tag":56,"props":369,"children":370},{},[371,373,378,380,385,387,393],{"type":53,"value":372},"No production-safe SQL view exposes per-store capacity. Use the DB Console\n",{"type":48,"tag":73,"props":374,"children":375},{},[376],{"type":53,"value":377},"Overview",{"type":53,"value":379}," → ",{"type":48,"tag":73,"props":381,"children":382},{},[383],{"type":53,"value":384},"Storage",{"type":53,"value":386}," page (sorts per-store usage), or scrape the\nper-node Prometheus endpoint and look at the smallest ",{"type":48,"tag":114,"props":388,"children":390},{"className":389},[],[391],{"type":53,"value":392},"capacity_available",{"type":53,"value":394},":",{"type":48,"tag":396,"props":397,"children":402},"pre",{"className":398,"code":399,"language":400,"meta":401,"style":401},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl -ks https:\u002F\u002F\u003Cnode>:8080\u002F_status\u002Fvars | grep -E '^capacity( |_used|_available)'\n","bash","",[403],{"type":48,"tag":114,"props":404,"children":405},{"__ignoreMap":401},[406],{"type":48,"tag":407,"props":408,"children":411},"span",{"class":409,"line":410},"line",1,[412,418,424,429,435,440,446,451,456,461,466,471,476,481],{"type":48,"tag":407,"props":413,"children":415},{"style":414},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[416],{"type":53,"value":417},"curl",{"type":48,"tag":407,"props":419,"children":421},{"style":420},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[422],{"type":53,"value":423}," -ks",{"type":48,"tag":407,"props":425,"children":426},{"style":420},[427],{"type":53,"value":428}," https:\u002F\u002F",{"type":48,"tag":407,"props":430,"children":432},{"style":431},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[433],{"type":53,"value":434},"\u003C",{"type":48,"tag":407,"props":436,"children":437},{"style":420},[438],{"type":53,"value":439},"nod",{"type":48,"tag":407,"props":441,"children":443},{"style":442},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[444],{"type":53,"value":445},"e",{"type":48,"tag":407,"props":447,"children":448},{"style":431},[449],{"type":53,"value":450},">",{"type":48,"tag":407,"props":452,"children":453},{"style":420},[454],{"type":53,"value":455},":8080\u002F_status\u002Fvars",{"type":48,"tag":407,"props":457,"children":458},{"style":431},[459],{"type":53,"value":460}," |",{"type":48,"tag":407,"props":462,"children":463},{"style":414},[464],{"type":53,"value":465}," grep",{"type":48,"tag":407,"props":467,"children":468},{"style":420},[469],{"type":53,"value":470}," -E",{"type":48,"tag":407,"props":472,"children":473},{"style":431},[474],{"type":53,"value":475}," '",{"type":48,"tag":407,"props":477,"children":478},{"style":420},[479],{"type":53,"value":480},"^capacity( |_used|_available)",{"type":48,"tag":407,"props":482,"children":483},{"style":431},[484],{"type":53,"value":485},"'\n",{"type":48,"tag":204,"props":487,"children":489},{"id":488},"step-2-estimate-the-affected-tableindex-size",[490],{"type":53,"value":491},"Step 2 — Estimate the affected table\u002Findex size",{"type":48,"tag":56,"props":493,"children":494},{},[495,497,503],{"type":53,"value":496},"Use the docs-recommended form of ",{"type":48,"tag":114,"props":498,"children":500},{"className":499},[],[501],{"type":53,"value":502},"SHOW RANGES",{"type":53,"value":394},{"type":48,"tag":396,"props":505,"children":508},{"className":506,"code":507,"language":24,"meta":401,"style":401},"language-sql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","SHOW RANGES FROM TABLE \u003Ctable> WITH DETAILS, KEYS, INDEXES;\n",[509],{"type":48,"tag":114,"props":510,"children":511},{"__ignoreMap":401},[512],{"type":48,"tag":407,"props":513,"children":514},{"class":409,"line":410},[515],{"type":48,"tag":407,"props":516,"children":517},{},[518],{"type":53,"value":507},{"type":48,"tag":56,"props":520,"children":521},{},[522,524,530,532,538],{"type":53,"value":523},"The output includes one row per range, with ",{"type":48,"tag":114,"props":525,"children":527},{"className":526},[],[528],{"type":53,"value":529},"range_size_mb",{"type":53,"value":531}," and ",{"type":48,"tag":114,"props":533,"children":535},{"className":534},[],[536],{"type":53,"value":537},"index_name",{"type":53,"value":539},".\nAggregate by index for the per-index totals that matter for capacity planning:",{"type":48,"tag":396,"props":541,"children":543},{"className":506,"code":542,"language":24,"meta":401,"style":401},"WITH r AS (SHOW RANGES FROM TABLE \u003Ctable> WITH DETAILS, KEYS, INDEXES)\nSELECT\n  index_name,\n  COUNT(*)                              AS range_count,\n  ROUND(SUM(range_size_mb), 2)          AS index_size_mb,\n  ROUND(SUM(range_size_mb) \u002F 1024, 2)   AS index_size_gb\nFROM r\nGROUP BY index_name\nORDER BY index_size_mb DESC;\n",[544],{"type":48,"tag":114,"props":545,"children":546},{"__ignoreMap":401},[547,555,563,571,580,589,598,607,616],{"type":48,"tag":407,"props":548,"children":549},{"class":409,"line":410},[550],{"type":48,"tag":407,"props":551,"children":552},{},[553],{"type":53,"value":554},"WITH r AS (SHOW RANGES FROM TABLE \u003Ctable> WITH DETAILS, KEYS, INDEXES)\n",{"type":48,"tag":407,"props":556,"children":557},{"class":409,"line":29},[558],{"type":48,"tag":407,"props":559,"children":560},{},[561],{"type":53,"value":562},"SELECT\n",{"type":48,"tag":407,"props":564,"children":565},{"class":409,"line":25},[566],{"type":48,"tag":407,"props":567,"children":568},{},[569],{"type":53,"value":570},"  index_name,\n",{"type":48,"tag":407,"props":572,"children":574},{"class":409,"line":573},4,[575],{"type":48,"tag":407,"props":576,"children":577},{},[578],{"type":53,"value":579},"  COUNT(*)                              AS range_count,\n",{"type":48,"tag":407,"props":581,"children":583},{"class":409,"line":582},5,[584],{"type":48,"tag":407,"props":585,"children":586},{},[587],{"type":53,"value":588},"  ROUND(SUM(range_size_mb), 2)          AS index_size_mb,\n",{"type":48,"tag":407,"props":590,"children":592},{"class":409,"line":591},6,[593],{"type":48,"tag":407,"props":594,"children":595},{},[596],{"type":53,"value":597},"  ROUND(SUM(range_size_mb) \u002F 1024, 2)   AS index_size_gb\n",{"type":48,"tag":407,"props":599,"children":601},{"class":409,"line":600},7,[602],{"type":48,"tag":407,"props":603,"children":604},{},[605],{"type":53,"value":606},"FROM r\n",{"type":48,"tag":407,"props":608,"children":610},{"class":409,"line":609},8,[611],{"type":48,"tag":407,"props":612,"children":613},{},[614],{"type":53,"value":615},"GROUP BY index_name\n",{"type":48,"tag":407,"props":617,"children":619},{"class":409,"line":618},9,[620],{"type":48,"tag":407,"props":621,"children":622},{},[623],{"type":53,"value":624},"ORDER BY index_size_mb DESC;\n",{"type":48,"tag":204,"props":626,"children":628},{"id":627},"step-3-compare-against-the-operation",[629],{"type":53,"value":630},"Step 3 — Compare against the operation",{"type":48,"tag":632,"props":633,"children":634},"table",{},[635,654],{"type":48,"tag":636,"props":637,"children":638},"thead",{},[639],{"type":48,"tag":640,"props":641,"children":642},"tr",{},[643,649],{"type":48,"tag":644,"props":645,"children":646},"th",{},[647],{"type":53,"value":648},"Operation",{"type":48,"tag":644,"props":650,"children":651},{},[652],{"type":53,"value":653},"Conservative free-space target (per store)",{"type":48,"tag":655,"props":656,"children":657},"tbody",{},[658,688,709],{"type":48,"tag":640,"props":659,"children":660},{},[661,676],{"type":48,"tag":662,"props":663,"children":664},"td",{},[665,670,671],{"type":48,"tag":114,"props":666,"children":668},{"className":667},[],[669],{"type":53,"value":119},{"type":53,"value":230},{"type":48,"tag":114,"props":672,"children":674},{"className":673},[],[675],{"type":53,"value":236},{"type":48,"tag":662,"props":677,"children":678},{},[679,681,686],{"type":53,"value":680},"Up to 3× the size of the ",{"type":48,"tag":344,"props":682,"children":683},{},[684],{"type":53,"value":685},"new",{"type":53,"value":687}," index (its indexed + PK columns).",{"type":48,"tag":640,"props":689,"children":690},{},[691,699],{"type":48,"tag":662,"props":692,"children":693},{},[694],{"type":48,"tag":114,"props":695,"children":697},{"className":696},[],[698],{"type":53,"value":153},{"type":48,"tag":662,"props":700,"children":701},{},[702,703,707],{"type":53,"value":680},{"type":48,"tag":344,"props":704,"children":705},{},[706],{"type":53,"value":632},{"type":53,"value":708}," (sum of the relevant indexes from step 2).",{"type":48,"tag":640,"props":710,"children":711},{},[712,726],{"type":48,"tag":662,"props":713,"children":714},{},[715,720,721],{"type":48,"tag":114,"props":716,"children":718},{"className":717},[],[719],{"type":53,"value":162},{"type":53,"value":230},{"type":48,"tag":114,"props":722,"children":724},{"className":723},[],[725],{"type":53,"value":171},{"type":48,"tag":662,"props":727,"children":728},{},[729],{"type":53,"value":730},"Up to 3× the expected size of the materialized result.",{"type":48,"tag":56,"props":732,"children":733},{},[734],{"type":53,"value":735},"The new index does not exist yet, so estimate it from a comparable existing\nindex (e.g. one on similarly typed columns) or from the source columns'\ncontribution to the primary index.",{"type":48,"tag":56,"props":737,"children":738},{},[739],{"type":53,"value":740},"If the smallest free-space figure from step 1 is well above the target, the\noperation is safe to run. If it is close, free space first (drop unused\nindexes, expand storage) before issuing the DDL.",{"type":48,"tag":94,"props":742,"children":744},{"id":743},"operational-notes",[745],{"type":53,"value":746},"Operational Notes",{"type":48,"tag":106,"props":748,"children":749},{},[750,766,822,857],{"type":48,"tag":110,"props":751,"children":752},{},[753,764],{"type":48,"tag":73,"props":754,"children":755},{},[756,762],{"type":48,"tag":114,"props":757,"children":759},{"className":758},[],[760],{"type":53,"value":761},"SHOW RANGES ... WITH DETAILS",{"type":53,"value":763}," is expensive.",{"type":53,"value":765}," It computes span statistics\non demand. Always target a specific table, never run it cluster-wide, and\nprefer maintenance windows on tables with thousands of ranges.",{"type":48,"tag":110,"props":767,"children":768},{},[769,774,776,781,783],{"type":48,"tag":73,"props":770,"children":771},{},[772],{"type":53,"value":773},"Watch the job, not just disk.",{"type":53,"value":775}," If a backfill pauses with\n",{"type":48,"tag":114,"props":777,"children":779},{"className":778},[],[780],{"type":53,"value":335},{"type":53,"value":782},", free disk on the affected store and resume the\npaused schema change job. Check with:\n",{"type":48,"tag":396,"props":784,"children":786},{"className":506,"code":785,"language":24,"meta":401,"style":401},"WITH j AS (SHOW JOBS)\nSELECT job_id, status, error\nFROM j\nWHERE job_type = 'SCHEMA CHANGE' AND status = 'paused';\n",[787],{"type":48,"tag":114,"props":788,"children":789},{"__ignoreMap":401},[790,798,806,814],{"type":48,"tag":407,"props":791,"children":792},{"class":409,"line":410},[793],{"type":48,"tag":407,"props":794,"children":795},{},[796],{"type":53,"value":797},"WITH j AS (SHOW JOBS)\n",{"type":48,"tag":407,"props":799,"children":800},{"class":409,"line":29},[801],{"type":48,"tag":407,"props":802,"children":803},{},[804],{"type":53,"value":805},"SELECT job_id, status, error\n",{"type":48,"tag":407,"props":807,"children":808},{"class":409,"line":25},[809],{"type":48,"tag":407,"props":810,"children":811},{},[812],{"type":53,"value":813},"FROM j\n",{"type":48,"tag":407,"props":815,"children":816},{"class":409,"line":573},[817],{"type":48,"tag":407,"props":818,"children":819},{},[820],{"type":53,"value":821},"WHERE job_type = 'SCHEMA CHANGE' AND status = 'paused';\n",{"type":48,"tag":110,"props":823,"children":824},{},[825,830,832,838,840,846,848,855],{"type":48,"tag":73,"props":826,"children":827},{},[828],{"type":53,"value":829},"Drop unused indexes first.",{"type":53,"value":831}," Often the cheapest way to free headroom\nbefore a large backfill is to drop indexes that\n",{"type":48,"tag":114,"props":833,"children":835},{"className":834},[],[836],{"type":53,"value":837},"crdb_internal.index_usage_statistics",{"type":53,"value":839}," shows are unused (this is one of the\n12 production-safe ",{"type":48,"tag":114,"props":841,"children":843},{"className":842},[],[844],{"type":53,"value":845},"crdb_internal",{"type":53,"value":847}," views, per the\n",{"type":48,"tag":62,"props":849,"children":852},{"href":850,"rel":851},"https:\u002F\u002Fwww.cockroachlabs.com\u002Fdocs\u002Fstable\u002Fcrdb-internal",[66],[853],{"type":53,"value":854},"docs",{"type":53,"value":856},").",{"type":48,"tag":110,"props":858,"children":859},{},[860,865,867,872],{"type":48,"tag":73,"props":861,"children":862},{},[863],{"type":53,"value":864},"Statistics lag.",{"type":53,"value":866}," ",{"type":48,"tag":114,"props":868,"children":870},{"className":869},[],[871],{"type":53,"value":529},{"type":53,"value":873}," is approximate and can lag actual disk\nusage; treat estimates as conservative ballparks, not exact figures.",{"type":48,"tag":94,"props":875,"children":877},{"id":876},"references",[878],{"type":53,"value":879},"References",{"type":48,"tag":106,"props":881,"children":882},{},[883,892],{"type":48,"tag":110,"props":884,"children":885},{},[886],{"type":48,"tag":62,"props":887,"children":889},{"href":64,"rel":888},[66],[890],{"type":53,"value":891},"Online Schema Changes — Estimate your storage capacity",{"type":48,"tag":110,"props":893,"children":894},{},[895],{"type":48,"tag":62,"props":896,"children":899},{"href":897,"rel":898},"https:\u002F\u002Fwww.cockroachlabs.com\u002Fdocs\u002Fstable\u002Fshow-ranges.html",[66],[900],{"type":53,"value":502},{"type":48,"tag":94,"props":902,"children":904},{"id":903},"related-skills",[905],{"type":53,"value":906},"Related Skills",{"type":48,"tag":106,"props":908,"children":909},{},[910],{"type":48,"tag":110,"props":911,"children":912},{},[913,917],{"type":48,"tag":62,"props":914,"children":915},{"href":87},[916],{"type":53,"value":90},{"type":53,"value":918}," — range count, leaseholder placement, fragmentation",{"type":48,"tag":920,"props":921,"children":922},"style",{},[923],{"type":53,"value":924},"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":926,"total":1079},[927,946,962,977,988,998,1011,1020,1027,1042,1053,1066],{"slug":928,"name":928,"fn":929,"description":930,"org":931,"tags":932,"stars":943,"repoUrl":944,"updatedAt":945},"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},[933,934,937,940],{"name":17,"slug":18,"type":15},{"name":935,"slug":936,"type":15},"Incident Response","incident-response",{"name":938,"slug":939,"type":15},"Kubernetes","kubernetes",{"name":941,"slug":942,"type":15},"Monitoring","monitoring",105,"https:\u002F\u002Fgithub.com\u002Fcockroachdb\u002Fhelm-charts","2026-07-12T07:57:25.288146",{"slug":947,"name":947,"fn":948,"description":949,"org":950,"tags":951,"stars":943,"repoUrl":944,"updatedAt":961},"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},[952,955,958],{"name":953,"slug":954,"type":15},"Deployment","deployment",{"name":956,"slug":957,"type":15},"Encryption","encryption",{"name":959,"slug":960,"type":15},"Security","security","2026-07-12T07:56:37.675396",{"slug":963,"name":963,"fn":964,"description":965,"org":966,"tags":967,"stars":943,"repoUrl":944,"updatedAt":976},"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},[968,969,972,973],{"name":17,"slug":18,"type":15},{"name":970,"slug":971,"type":15},"Debugging","debugging",{"name":938,"slug":939,"type":15},{"name":974,"slug":975,"type":15},"Migration","migration","2026-07-12T07:56:48.360871",{"slug":978,"name":978,"fn":979,"description":980,"org":981,"tags":982,"stars":943,"repoUrl":944,"updatedAt":987},"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},[983,984,985,986],{"name":17,"slug":18,"type":15},{"name":970,"slug":971,"type":15},{"name":953,"slug":954,"type":15},{"name":938,"slug":939,"type":15},"2026-07-12T07:57:24.018818",{"slug":989,"name":989,"fn":990,"description":991,"org":992,"tags":993,"stars":943,"repoUrl":944,"updatedAt":997},"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},[994,995,996],{"name":17,"slug":18,"type":15},{"name":953,"slug":954,"type":15},{"name":938,"slug":939,"type":15},"2026-07-12T07:56:45.777567",{"slug":999,"name":999,"fn":1000,"description":1001,"org":1002,"tags":1003,"stars":943,"repoUrl":944,"updatedAt":1010},"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},[1004,1005,1006,1007],{"name":17,"slug":18,"type":15},{"name":953,"slug":954,"type":15},{"name":938,"slug":939,"type":15},{"name":1008,"slug":1009,"type":15},"Operations","operations","2026-07-12T07:56:47.082609",{"slug":90,"name":90,"fn":1012,"description":1013,"org":1014,"tags":1015,"stars":25,"repoUrl":26,"updatedAt":1019},"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},[1016,1017,1018],{"name":17,"slug":18,"type":15},{"name":941,"slug":942,"type":15},{"name":13,"slug":14,"type":15},"2026-07-12T07:57:18.753533",{"slug":4,"name":4,"fn":5,"description":6,"org":1021,"tags":1022,"stars":25,"repoUrl":26,"updatedAt":27},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1023,1024,1025,1026],{"name":20,"slug":21,"type":15},{"name":17,"slug":18,"type":15},{"name":13,"slug":14,"type":15},{"name":23,"slug":24,"type":15},{"slug":1028,"name":1028,"fn":1029,"description":1030,"org":1031,"tags":1032,"stars":25,"repoUrl":26,"updatedAt":1041},"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},[1033,1036,1039,1040],{"name":1034,"slug":1035,"type":15},"Audit","audit",{"name":1037,"slug":1038,"type":15},"Compliance","compliance",{"name":17,"slug":18,"type":15},{"name":959,"slug":960,"type":15},"2026-07-18T05:48:00.862384",{"slug":1043,"name":1043,"fn":1044,"description":1045,"org":1046,"tags":1047,"stars":25,"repoUrl":26,"updatedAt":1052},"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},[1048,1049,1050,1051],{"name":1034,"slug":1035,"type":15},{"name":17,"slug":18,"type":15},{"name":1008,"slug":1009,"type":15},{"name":959,"slug":960,"type":15},"2026-07-12T07:57:01.506735",{"slug":1054,"name":1054,"fn":1055,"description":1056,"org":1057,"tags":1058,"stars":25,"repoUrl":26,"updatedAt":1065},"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},[1059,1060,1063,1064],{"name":1034,"slug":1035,"type":15},{"name":1061,"slug":1062,"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":1067,"name":1067,"fn":1068,"description":1069,"org":1070,"tags":1071,"stars":25,"repoUrl":26,"updatedAt":1078},"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},[1072,1073,1076,1077],{"name":17,"slug":18,"type":15},{"name":1074,"slug":1075,"type":15},"Engineering","engineering",{"name":13,"slug":14,"type":15},{"name":23,"slug":24,"type":15},"2026-07-12T07:57:26.543278",40,{"items":1081,"total":1133},[1082,1088,1095,1102,1109,1116,1123],{"slug":90,"name":90,"fn":1012,"description":1013,"org":1083,"tags":1084,"stars":25,"repoUrl":26,"updatedAt":1019},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1085,1086,1087],{"name":17,"slug":18,"type":15},{"name":941,"slug":942,"type":15},{"name":13,"slug":14,"type":15},{"slug":4,"name":4,"fn":5,"description":6,"org":1089,"tags":1090,"stars":25,"repoUrl":26,"updatedAt":27},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1091,1092,1093,1094],{"name":20,"slug":21,"type":15},{"name":17,"slug":18,"type":15},{"name":13,"slug":14,"type":15},{"name":23,"slug":24,"type":15},{"slug":1028,"name":1028,"fn":1029,"description":1030,"org":1096,"tags":1097,"stars":25,"repoUrl":26,"updatedAt":1041},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1098,1099,1100,1101],{"name":1034,"slug":1035,"type":15},{"name":1037,"slug":1038,"type":15},{"name":17,"slug":18,"type":15},{"name":959,"slug":960,"type":15},{"slug":1043,"name":1043,"fn":1044,"description":1045,"org":1103,"tags":1104,"stars":25,"repoUrl":26,"updatedAt":1052},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1105,1106,1107,1108],{"name":1034,"slug":1035,"type":15},{"name":17,"slug":18,"type":15},{"name":1008,"slug":1009,"type":15},{"name":959,"slug":960,"type":15},{"slug":1054,"name":1054,"fn":1055,"description":1056,"org":1110,"tags":1111,"stars":25,"repoUrl":26,"updatedAt":1065},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1112,1113,1114,1115],{"name":1034,"slug":1035,"type":15},{"name":1061,"slug":1062,"type":15},{"name":17,"slug":18,"type":15},{"name":13,"slug":14,"type":15},{"slug":1067,"name":1067,"fn":1068,"description":1069,"org":1117,"tags":1118,"stars":25,"repoUrl":26,"updatedAt":1078},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1119,1120,1121,1122],{"name":17,"slug":18,"type":15},{"name":1074,"slug":1075,"type":15},{"name":13,"slug":14,"type":15},{"name":23,"slug":24,"type":15},{"slug":1124,"name":1124,"fn":1125,"description":1126,"org":1127,"tags":1128,"stars":25,"repoUrl":26,"updatedAt":1132},"cockroachdb-sql","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},[1129,1130,1131],{"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]