// troubleshooting guide · cockroachdb

Why Is CockroachDB Slow? Slow Query Fixes

Status
Ongoing
platforms:
Self-hosted and CockroachDB Cloud
updated:
November 15, 2026
reports:
4
Method
how we research
Share

RUNBOOK · cockroachdb/slow-queries4 FIXES

// quick answer

CockroachDB is slower than single-node PostgreSQL for many workloads because every write replicates through consensus. Find slow statements, add indexes, avoid cross-region round trips and full scans.

Most likely fix: Find the slow statements

How to fix it

// try these in order, the most common fix is first

  1. FIX 1Find the slow statements

    1. 01Open DB Console > SQL Activity > Statements and sort by latency
    2. 02Run EXPLAIN ANALYZE on the worst queries and look for full scans
    Did this fix it?
  2. FIX 2Add or fix indexes

    1. 01Create indexes suggested on the Insights page
    2. 02Use covering indexes (STORING) to avoid index joins
    3. 03Drop unused indexes that slow writes
    Did this fix it?
  3. FIX 3Cut round trips

    1. 01Batch inserts/updates and use multi-row INSERT
    2. 02Fix N+1 queries in your ORM
    3. 03Place the app in the same region as the leaseholder; use REGIONAL BY ROW or follower reads for reads
    Did this fix it?
  4. FIX 4Scale or rethink

    1. 01Add vCPUs or nodes and check for hot ranges
    2. 02For single-region apps, compare with PostgreSQL or Aurora
    3. 03Move analytics to a warehouse
    Did this fix it?

Symptoms

Queries take hundreds of ms; latency rises under load; high CPU; slow single-region performance versus Postgres.

Why it happens

  • C-01Cross-region consensus adds network latency to every write
  • C-02Full table scans due to missing indexes
  • C-03Contention and transaction retries
  • C-04Chatty ORMs sending many small statements and N+1 queries
  • C-05Under-provisioned vCPUs or hot ranges
  • C-06Analytical (OLAP) queries on an OLTP-oriented database

// this guide also covers

  • why is cockroachdb so slow
  • cockroachdb slow queries
  • cockroachdb performance issues
  • cockroachdb slower than postgres
  • cockroachdb high latency

Still not working?

If CockroachDB keeps failing, you're not alone. See every CockroachDB problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us

Watch CockroachDB Get an email when its price changes, it has an outage, or we publish a new fix. No spam.

Fixed it? Share this guide

Other CockroachDB errors