vs

TiDB vs TiKV

TiDB: MySQL-compatible distributed SQL with a row store for OLTP and a columnar replica for real-time analytics. TiKV: CNCF-graduated, Raft-replicated transactional key-value store in Rust; the storage layer of TiDB.

key differences

  • TiDB is primarily a relational database; TiKV is key-value.
  • Only TiDB has joins, secondary indexes, vector search, json, columnar storage.
  • TiDB has a serverless option; TiKV does not.

choose tidb for

  • +Replacing hand-sharded MySQL
  • +HTAP dashboards on live transactional data
  • +SaaS platforms with very large tenant counts
  • +Payment and order systems at internet scale

best at · OLTP, HTAP, Real-time analytics

choose tikv for

  • +Storage layer for distributed SQL (TiDB)
  • +Metadata for distributed file systems (JuiceFS)
  • +Large-scale transactional key-value services
  • +Redis-protocol or custom data layers needing strong consistency

best at · OLTP, Metadata, HTAP

overview
Primary model
Relational
Key-Value
Also supports
Document, Columnar / OLAP, Vector
–
Type
Database engine
Database engine
Status
Active
Active
Developer
PingCAP
PingCAP / CNCF
First release
2017
2016
Latest version
8.5.8 (Aug 27, 2026)
8.5.8 (Aug 27, 2026)
License
Open source (permissive)Apache License 2.0
Open source (permissive)Apache License 2.0
Free tier
✓
✓
popularity
WhichDB Score
35.9
20.8
Rank
#56
#148
GitHub stars
40.7K
16.9K
Stack Overflow questions
102
26
scale & guarantees
Comfortable data size
Massive (Multi-PB)
Massive (Multi-PB)
Horizontal scaling
Native
Native
Multi-region
Read replicas
Read replicas
ACID
Full
Full
Consistency
Strong
Strong
Schema
Strict
Schemaless
Architecture
Distributed, Client server, Serverless
Distributed, Client server
deployment
Self-hosted
✓
✓
Vendor-managed cloud
✓
—
Serverless
✓
—
Embedded
—
—
Edge
—
—
Clouds
AWS, Google Cloud, Azure, Alibaba Cloud
–
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
TiKV API (Raw and Transactional)
Client languages
Java, Go, Python, JavaScript, C#, Ruby, PHP, Rust
Go, Rust, Java, Python, C++, JavaScript
Best for
OLTP, HTAP, Real-time analytics, Vector search
OLTP, Metadata, HTAP

TiDB vs TiKV: FAQ

What is the difference between TiDB and TiKV?

TiDB: MySQL-compatible distributed SQL with a row store for OLTP and a columnar replica for real-time analytics. TiKV: CNCF-graduated, Raft-replicated transactional key-value store in Rust; the storage layer of TiDB. TiDB is primarily a relational database; TiKV is key-value. Only TiDB has joins, secondary indexes, vector search, json, columnar storage. TiDB has a serverless option; TiKV does not.

When should I choose TiDB over TiKV?

Choose TiDB for replacing hand-sharded MySQL, HTAP dashboards on live transactional data and SaaS platforms with very large tenant counts. Choose TiKV for storage layer for distributed SQL (TiDB), metadata for distributed file systems (JuiceFS) and large-scale transactional key-value services.

Is TiDB or TiKV more popular?

TiDB ranks #56 on the WhichDB Score (35.9/100) and TiKV ranks #148 (20.8/100). Popularity is not fit: check the requirements that matter for your project.

Are TiDB and TiKV open source?

Yes. TiDB is open source. License: Apache License 2.0. Yes. TiKV is open source. License: Apache License 2.0.