CockroachDB vs TiDB
CockroachDB and TiDB compared field by field from their catalog records. Both are listed under Distributed OLTP.
| Attribute | CockroachDB | TiDB |
|---|---|---|
| Maintainer | Cockroach Labs | PingCAP |
| Categories | Distributed OLTP, Globally Distributed SQL, Geospatial Databases, Vector Extensions & Plugins | HTAP Databases, Distributed OLTP |
| Status | active | active |
| License | LicenseRef-CockroachDB-Software-License | Apache-2.0 |
| Open source (OSI) | No | Yes |
| First release | 2017 | 2017 |
| Latest stable version | 26.4.1 (Nov 18, 2026) | 8.5.8 (Aug 27, 2026) |
| Deployment | self-hosted, managed, serverless | self-hosted, managed, serverless |
| Wire compatibility | postgres | mysql |
| Query languages | SQL | SQL |
| Written in | Go | Go, Rust, C++ |
| Radar ring | trial | trial |
| Last verified | Dec 3, 2026 | Dec 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:
- cockroachlabs.com/docs/releases/v26.4 cockroachlabs.com
- cockroachlabs.com/docs/releases cockroachlabs.com
- cockroachlabs.com/blog/enterprise-license-announcement cockroachlabs.com
- github.com/cockroachdb/cockroach github.com
- docs.pingcap.com/tidb/v8.5/release-8.5.8 docs.pingcap.com
- docs.pingcap.com/releases/tidb-self-managed/llms.txt docs.pingcap.com
- pingcap.com/tidb-release-support-policy pingcap.com
- github.com/pingcap/tidb/releases github.com
Found an error? See how to report a correction.