← Back to Leaderboard
Tpingcap

pingcap/tidb

Distributed MySQL-compatible SQL for transactions, analytics, and vector retrieval

RAG & Data Tool
Engineering Health (Methodology)
A+ · 97/100
Maintenance Activity
● Updated today
Latest Release
v7.5.8
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption25/25
Release Cadence17/20
License Clarity20/20
DockerSelf-Hosted
Total Stars
★ 40,802
24h Growth
+2
7d Growth
+27
Forks
6,323

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

pingcap/tidb Star History (2020-01-12 - 2026-12-03) ALL-TIME STAR HISTORY (2020-01 – 2026-12) +20k in 2517d · avg +8/day 41.9k 30k 18k 2020-01-12: ★ 20,7912020-06-13: ★ 22,4592020-11-14: ★ 24,1932021-04-17: ★ 25,9842021-09-18: ★ 27,5712022-02-19: ★ 29,0292022-07-23: ★ 30,5362022-12-24: ★ 31,7662023-05-27: ★ 32,9712023-10-28: ★ 34,0332024-03-30: ★ 35,0882024-08-31: ★ 36,0872025-02-01: ★ 37,2222025-07-05: ★ 38,1622025-12-06: ★ 39,0042026-05-09: ★ 39,8052026-12-03: ★ 40,802 ★ 40.8k 2020-01 2023-06 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

TiDB is a distributed SQL system with separate compute and storage layers. Applications connect to TiDB Server using a MySQL driver or ORM, and the server coordinates query execution. TiKV provides row-oriented storage; TiFlash uses Multi-Raft Learner replication from TiKV to provide a columnar copy for analytics. Raft quorum replication and two-phase commit solve different problems: the former keeps replicas consistent, while the latter coordinates transactions spanning nodes.

The Go module is github.com/pingcap/tidb. The tree separates cmd/ and pkg/ from tooling directories such as br/, dumpling/, and lightning/. The dependency manifest includes Apache Arrow Go v18 and cloud libraries for services such as Google Cloud Storage and Azure Blob Storage. These are build dependencies, not evidence that a self-hosted SQL cluster needs a cloud account. For application integration, the relevant interface is SQL through the MySQL client ecosystem.

Key Capabilities & Differentiators

TiDB combines distributed ACID transactions with hybrid transactional and analytical processing (HTAP). A write must reach a majority of replicas, so fault tolerance depends on which replicas remain reachable and where they are placed. SQL compute and storage can scale independently. TiFlash adds a columnar path for analytical scans without requiring the application to export transactional data into a separate reporting store.

For RAG and agent applications, TiDB is a data layer: it can hold application state and document metadata, and deployments with vector support can also serve retrieval queries. The available vector-search link targets TiDB Cloud; it does not establish the index algorithms, distance functions, or feature parity of the listed self-hosted release lines. Treat embedding generation, ingestion orchestration, and reranking as separate application responsibilities.

Trade-offs & Limitations

Compared with single-node MySQL, TiDB offers independently scalable SQL and storage tiers and quorum-based replication, but adds network round trips, replicated storage, and more failure modes to operate. TiFlash can give analytical scans a separate execution path, at the cost of extra storage and replication. Benchmark mixed read/write workloads and test loss of a replica or availability zone; redundancy does not guarantee availability after quorum is lost.

Compared with a dedicated vector store, TiDB’s advantage is keeping authoritative relational data and retrieval in one database where the chosen release supports it. If filtered recall, index maintenance, or retrieval tail latency drives the decision, measure those on your corpus rather than inferring them from feature presence. Validate existing MySQL queries and ORM migrations as well: driver compatibility is not a guarantee of identical SQL behavior.

Hardware & Deployment Guide

Start with a local playground to validate SQL behavior and MySQL client compatibility. For self-managed Kubernetes, use TiDB Operator; TiUP is also referenced for cluster scaling. TiDB Cloud is the managed alternative. The root Dockerfile explicitly targets development, so use production artifacts and deployment procedures appropriate to the chosen release rather than promoting a local build image as-is.

The supplied go.mod and Docker builder both specify Go 1.27.3 for the source snapshot; that is not a runtime requirement for packaged binaries. The release list includes v8.5.7, v8.5.8, and v7.5.8. These entries show patch activity on two release lines, not feature parity. Pin the component versions, verify vector features on the chosen line, and test backup recovery and failover before production.

SQL integration: Applications connect to TiDB Server using MySQL drivers or ORMs.
Transaction semantics: Two-phase commit coordinates ACID transactions across nodes; Raft handles storage replication.
HTAP storage: TiKV stores rows, while TiFlash maintains a columnar copy via Multi-Raft Learner replication.
RAG fit: Vector search can complement relational state, but self-hosted index and query support must be checked for the chosen release.
Scaling: SQL compute and storage can scale independently; replica placement controls which failures the cluster can tolerate.
Deployment boundary: The root Dockerfile is for development; TiDB Operator is the documented route for self-managed Kubernetes.
Best For

Teams that need horizontally scalable transactional SQL and want analytics or RAG retrieval close to authoritative application data, with the ability to operate a distributed cluster or use a managed service.

Skip If

A single MySQL server meets your needs, vector retrieval is the only workload, or your chosen self-hosted release cannot meet your index, filtering, or latency requirements.

Reviewed on 2026-12-03 · Grounded in GitHub README, root file tree & releasesMethodology

Comparison vs. Top RAG, Data & Memory Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
tidb ★40.8k+27GoApache-2.0Distributed MySQL-compatible SQL for transactions, analytics, and vector retriev
OpenViking43.2k+255PythonAGPL-3.0A directory-scoped RAG database for inspectable agent knowledge and memory
nebula12.5k+10C++Apache-2.0Distributed graph storage and querying for GraphRAG and knowledge graphs
manticoresearch12.1k+8C++GPL-3.0C++ search database for real-time full-text, vector, and hybrid retrieval

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/pingcap/tidb.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

pingcap/tidb Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about tidb

How does an application connect, and where do transactional, analytical, and vector queries fit?

Connect to TiDB Server with a MySQL driver or ORM. TiKV stores transactional rows; TiFlash provides a columnar copy for analytical queries. For retrieval, verify vector types, query syntax, and index support on the exact self-hosted release before designing the schema.

What hardware should we budget for, and do we need a GPU?

The Go build toolchain is not a runtime requirement when using packaged binaries, and no database-side GPU or VRAM requirement is established here. Size CPU, memory, disk, and network separately for SQL and storage nodes. Budget for TiKV replicas and, if enabled, the additional TiFlash copy. Size any separate embedding service independently.

Can we self-host TiDB commercially?

The repository is Apache-2.0 licensed, which generally permits commercial use, modification, and self-hosting. If you redistribute software or images, review the applicable license and notice obligations, including ThirdPartyNotices.txt. Verify the terms of any enterprise artifact separately; the presence of Dockerfile.enterprise does not establish those terms.

When should we choose TiDB over single-node MySQL or a dedicated vector database?

A single-node MySQL deployment is simpler when the workload fits on one server. A dedicated vector store is worth evaluating if retrieval quality, filtering, or index behavior is the main constraint. TiDB is most compelling when you need distributed transactions as well as analytics or retrieval on related data and want to avoid maintaining a separate application-level data copy.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining pingcap/tidb? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature pingcap/tidb on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare