TiDB

TiDB is an open source distributed scalable Hybrid Transactional and Analytical Processing (HTAP) database built by PingCAP. The goal of TiDB is to serve as a one-stop solution for both OLTP (Online Transactional Processing) and OLAP (Online Analytical Processing).

History

TiDB is inspired by the design of Google F1 and Google Spanner, and it supports features like infinite horizontal scalability, strong consistency, and high availability.

Joins

Hash Join Sort-Merge Join

TiDB’s SQL layer currently supports 3 types of distributed join: hash join, sort merge join (when the optimizer thinks even the smallest table is too large to fit in memory and the predicates contain indexed columns, the optimizer would choose sort merge join) and index lookup join.

Query Interface

SQL

Data Model

Key/Value

TiDB uses TiKV as the underlying data storage engine, which uses the Key-Value model and can be seen as a huge distributed ordered Map that is of high performance and reliability.

Storage Architecture

Disk-oriented

Isolation Levels

Read Committed Repeatable Read

TiDB uses the Percolator transaction model. A global read timestamp is obtained when the transaction is started, and a global commit timestamp is obtained when the transaction is committed. The execution order of transactions is confirmed based on the timestamps. Repeatable Read is the default transaction isolation level in TiDB.

TiDB Logo
Website

https://pingcap.com/en/

Source Code

https://github.com/pingcap/tidb

Tech Docs

https://pingcap.com/docs/

Developer

PingCAP

Country of Origin

CN

Start Year

2016

Project Type

Open Source

Written in

Go

Supported languages

C, C++, Cocoa, D, Eiffel, Erlang, Go, Haskell, Java, Lua, Ocaml, Perl, PHP, Python, Ruby, Scheme, SQL, Tcl

Derived From

Cloud Spanner, Google F1

Operating Systems

Linux

Licenses

Apache v2