CockroachDB vs TiDB

CockroachDB and TiDB compared field by field from their catalog records. Both are listed under Distributed OLTP.

AttributeCockroachDBTiDB
MaintainerCockroach LabsPingCAP
CategoriesDistributed OLTP, Globally Distributed SQL, Geospatial Databases, Vector Extensions & PluginsHTAP Databases, Distributed OLTP
Statusactiveactive
LicenseLicenseRef-CockroachDB-Software-LicenseApache-2.0
Open source (OSI)NoYes
First release20172017
Latest stable version26.4.1 (Nov 18, 2026)8.5.8 (Aug 27, 2026)
Deploymentself-hosted, managed, serverlessself-hosted, managed, serverless
Wire compatibilitypostgresmysql
Query languagesSQLSQL
Written inGoGo, Rust, C++
Radar ringtrialtrial
Last verifiedDec 3, 2026Dec 3, 2026

Summaries

CockroachDB

Raft-replicated SQL database that shards data into ranges and replicates them with Raft consensus to provide serializable transactions across nodes and regions. It speaks the PostgreSQL wire protocol and much of its SQL dialect, and supports table- and row-level data placement for multi-region deployments. It targets resilient transactional systems such as payments, identity and inventory that must survive node or region failures.

trial Technically strong for multi-region transactional workloads, but the move away from an open-source license means teams should review licensing costs and terms before committing.

TiDB

Open-source distributed SQL database compatible with the MySQL protocol. A stateless SQL layer sits on TiKV, a Raft-replicated transactional key-value store, while TiFlash keeps columnar replicas for analytical queries on the same data. It scales horizontally and is used for large MySQL workloads that outgrow sharding as well as mixed transactional and analytical use.

trial A proven open-source path for scaling MySQL-compatible workloads horizontally, with built-in columnar replicas for analytics.

Benchmarks including both

Sources

Last verified:

  1. cockroachlabs.com/docs/releases/v26.4 cockroachlabs.com
  2. cockroachlabs.com/docs/releases cockroachlabs.com
  3. cockroachlabs.com/blog/enterprise-license-announcement cockroachlabs.com
  4. github.com/cockroachdb/cockroach github.com
  5. docs.pingcap.com/tidb/v8.5/release-8.5.8 docs.pingcap.com
  6. docs.pingcap.com/releases/tidb-self-managed/llms.txt docs.pingcap.com
  7. pingcap.com/tidb-release-support-policy pingcap.com
  8. github.com/pingcap/tidb/releases github.com

Found an error? See how to report a correction.