vs

CockroachDB vs YDB

CockroachDB: Postgres-wire distributed SQL built to survive node, zone and region failures with serializable transactions. YDB: Open-source distributed SQL from Yandex combining row and column tables, topics and vector search.

key differences

  • Licensing: CockroachDB is source-available (CockroachDB Software License); YDB is open source (permissive) (Apache License 2.0).
  • YDB is built for larger datasets (Multi-PB) than CockroachDB (≤ 1 PB).
  • Only CockroachDB has full-text search, geospatial, triggers, stored procedures, materialized views.
  • Only YDB has pub/sub, columnar storage, streaming ingest.

choose cockroachdb for

  • +Global payments and ledger systems of record
  • +Identity, account and session metadata across regions
  • +Inventory and order management with strict consistency
  • +Data-residency workloads that must pin rows to a country

best at · OLTP, Geo, Metadata

choose ydb for

  • +High-load OLTP services needing automatic sharding
  • +Combined transactional and analytical workloads on one platform
  • +Event streaming with transactional consistency to tables
  • +Serverless backends on Yandex Cloud

best at · OLTP, OLAP, HTAP

overview
Primary model
Relational
Relational
Also supports
Document, Spatial, Vector
Key-Value, Columnar / OLAP, Document, Vector
Type
Database engine
Database engine
Status
Active
Active
Developer
Cockroach Labs
YDB (Yandex)
First release
2015
2022
Latest version
26.3 (Aug 19, 2026)
26.2.1.14 (Sep 17, 2026)
License
Source-availableCockroachDB Software License
Open source (permissive)Apache License 2.0
Free tier
✓
✓
popularity
WhichDB Score
47.1
27.4
Rank
#33
#103
GitHub stars
32.6K
4.8K
Stack Overflow questions
467
6
scale & guarantees
Comfortable data size
Large (≤ 1 PB)
Massive (Multi-PB)
Horizontal scaling
Native
Native
Multi-region
Active active
Active active
ACID
Full
Full
Consistency
Strong
Strong, Tunable
Schema
Strict
Strict
Architecture
Distributed, Multi primary, Client server, Serverless
Distributed, Client server, Serverless
deployment
Self-hosted
✓
✓
Vendor-managed cloud
✓
✓
Serverless
✓
✓
Embedded
—
—
Edge
—
—
Clouds
AWS, Google Cloud, Azure
–
capabilities
Transactions
✓
✓
Joins
✓
✓
Secondary indexes
✓
✓
Full-text search
✓
—
Vector search
✓
✓
Geospatial
✓
—
JSON
✓
✓
Change data capture
✓
✓
Triggers
✓
—
Stored procedures
✓
—
Materialized views
✓
—
TTL / expiry
✓
✓
Pub/Sub
—
✓
Columnar storage
—
✓
In-memory
—
—
Durable persistence
✓
✓
Compression
✓
✓
Encryption at rest
✓
✓
Role-based access
✓
✓
Time travel
✓
—
Branching
—
—
Online schema changes
✓
✓
Streaming ingest
—
✓
Offline sync
—
—
Runs in WebAssembly
—
—
interfaces
Query languages
SQL, PL/pgSQL
YQL (SQL dialect)
Client languages
Java, Go, Python, JavaScript, C#, Ruby, Rust, PHP
Java, Go, Python, C++, JavaScript, C#, Rust, PHP
Best for
OLTP, Geo, Metadata, Ledger
OLTP, OLAP, HTAP, Queue

CockroachDB vs YDB: FAQ

What is the difference between CockroachDB and YDB?

CockroachDB: Postgres-wire distributed SQL built to survive node, zone and region failures with serializable transactions. YDB: Open-source distributed SQL from Yandex combining row and column tables, topics and vector search. Licensing: CockroachDB is source-available (CockroachDB Software License); YDB is open source (permissive) (Apache License 2.0). YDB is built for larger datasets (Multi-PB) than CockroachDB (≤ 1 PB). Only CockroachDB has full-text search, geospatial, triggers, stored procedures, materialized views.

When should I choose CockroachDB over YDB?

Choose CockroachDB for global payments and ledger systems of record; identity, account and session metadata across regions; and inventory and order management with strict consistency. Choose YDB for high-load OLTP services needing automatic sharding; combined transactional and analytical workloads on one platform; and event streaming with transactional consistency to tables.

Is CockroachDB or YDB more popular?

CockroachDB ranks #33 on the WhichDB Score (47.1/100) and YDB ranks #103 (27.4/100). Popularity is not fit: check the requirements that matter for your project.

Are CockroachDB and YDB open source?

Not in the OSI sense. CockroachDB is source-available: you can read the code, but the license restricts some uses, typically offering it as a competing managed service. License: CockroachDB Software License. Yes. YDB is open source. License: Apache License 2.0.