At a glance
| Data model | Relational (SQL tables), with row (TiKV) and columnar (TiFlash) storage |
| Query language | SQL, MySQL 8.0-compatible dialect and protocol |
| Consistency model | Strong consistency: commits require a majority of replicas |
| Replication | Multi-Raft, at least three replicas; TiFlash replicas via Raft Learner |
| Partitioning or sharding | Automatic: PD manages metadata and balances data across TiKV nodes |
| Transactions | Distributed ACID transactions |
| Deployment and cloud availability | Self-managed (Linux, Kubernetes) or TiDB Cloud on AWS, Google Cloud and Azure |
| Licensing | Apache 2.0; TiDB Cloud commercial |
| TiDB Cloud pricing units | Request Units and GiB-month storage (Starter); monthly compute minimums (Essential, Premium); node configuration (Dedicated) |
TiDB is the natural distributed SQL candidate for MySQL applications that have outgrown one primary or a hand-built sharding layer, and it adds real-time analytics on the same data through TiFlash. It is open source under Apache 2.0, and TiDB Cloud Starter has a usable free allowance; production clusters are larger systems to run, so many teams start on TiDB Cloud.
Overview
TiDB separates a stateless SQL layer (the TiDB server, which PingCAP says scales to 512 compute nodes) from storage. TiKV is a distributed, row-based key-value store for transactional data, and TiFlash is a columnar engine that replicates from TiKV in real time with the Multi-Raft Learner protocol, so analytical queries can run on separate machines without slowing transactions. A placement driver (PD) manages metadata and balances data. Every piece of data has at least three replicas, and a transaction commits only once a majority of replicas have written it.
TiDB is designed to be compatible with MySQL 8.0, so many applications move with no or minimal code changes; it also offers native vector indexing for AI retrieval. Self-managed deployments run on Linux or on Kubernetes with TiDB Operator. PingCAP's managed TiDB Cloud ranges from the multi-tenant, autoscaling Starter plan to Dedicated clusters on AWS, Google Cloud and Azure, and a bring-your-own-cloud option.
Key features
- MySQL 8.0 compatibility for drivers, ORMs and most SQL
- Separate, independently scaled compute (TiDB server) and storage (TiKV) layers
- TiFlash columnar replicas for real-time analytics on transactional data (HTAP)
- Multi-Raft replication with at least three replicas and configurable placement
- Native vector indexing for retrieval-augmented generation workloads
- TiDB Operator for Kubernetes deployments
- TiDB Cloud plans from a free-allowance Starter to Dedicated and BYOC
Integrations and ecosystem
Pros and cons
Pros
- Apache 2.0 licence with no revenue or feature caps on the database
- MySQL-compatible, which shortens migrations from MySQL and MariaDB estates
- Built-in columnar engine for analytics on live transactional data
- TiDB Cloud Starter includes a monthly free allowance
Cons
- A self-managed cluster has several components (TiDB, TiKV, PD, TiFlash) to operate
- MySQL compatibility is high but not complete; check unsupported features before migrating
- Essential, Premium and BYOC plans were still in Public Preview in November 2026
- No published price for a commercial self-managed subscription
Pricing
Self-managed TiDB is free under Apache 2.0; the pricing page publishes no price for a commercial self-managed subscription. TiDB Cloud Starter has no base fee: each organisation gets a free allowance across up to five instances (25 GiB of row storage, 25 GiB of columnar storage and 250 million Request Units a month in total, 5 GiB, 5 GiB and 50 million RUs per instance), then usage is billed from USD 0.10 per million RUs, USD 0.20 per GiB-month of row storage and USD 0.05 per GiB-month of columnar storage, varying by cloud and region. Essential (Public Preview) starts from USD 400 a month and Premium (Public Preview) from USD 1,800 a month in compute, with minimum capacity charges and storage extra. Dedicated starts from USD 1,376 a month (AWS, 4 vCPUs per node) and runs on AWS, Google Cloud and Azure. BYOC (Public Preview) is by quote.
Pricing checked on the vendor's official page on 7 November 2026. Prices change; confirm before buying.
Who it is best for
MySQL-centred teams that need horizontal write scaling, strong consistency and real-time analytics on the same data, self-managed or on TiDB Cloud.
Typical use cases
- Replacing manually sharded MySQL with one horizontally scalable database
- Real-time dashboards and analytics on operational data without a separate ETL pipeline
- High-volume SaaS, fintech and e-commerce transactional systems
- Combining SQL, vector search and transactional data for AI applications
Who should look elsewhere
- PostgreSQL-centred applications, which align better with YugabyteDB or CockroachDB.
- Small MySQL applications that fit on one server with replicas: see distributed SQL vs MySQL for the scaling options inside the MySQL family.
Verdict
TiDB is a well-established open source distributed SQL database and the closest fit among them for MySQL users, with HTAP through TiFlash as a distinctive extra. It is more infrastructure than a single MySQL server, so weigh TiDB Cloud plans against running TiKV, PD and TiFlash yourself, and test MySQL compatibility with your own schema.
Frequently asked questions
Is TiDB open source?
Yes. The pingcap/tidb repository states that TiDB is licensed under Apache 2.0. TiDB Cloud is PingCAP's commercial managed service.
Is TiDB compatible with MySQL?
PingCAP describes TiDB as compatible with MySQL 8.0, so applications can often migrate with no or minimal code changes. Some MySQL features are not supported, so check the compatibility documentation for your schema.
Does TiDB Cloud have a free tier?
Yes. TiDB Cloud Starter has no base fee and a monthly free allowance per organisation across up to five instances: 25 GiB of row storage, 25 GiB of columnar storage and 250 million Request Units in total. Usage above that is billed.
What is the difference between TiKV and TiFlash?
TiKV is TiDB's distributed row store for transactions; TiFlash is a columnar store that replicates from TiKV in real time for analytical queries. The TiDB server coordinates query execution across both.
Sources
- pingcap/tidb repository
- TiDB releases (GitHub)
- TiDB overview (documentation)
- TiDB Cloud: select your plan
- TiDB product page
- TiDB Cloud pricing
Checked November 2026.
Listed in: NoSQL & Distributed Databases.
How we research reviews and what star ratings mean: our editorial method.