2. Agenda
● History and Community
● Technical Walkthrough
● Use Case with Mobike
● MySQL Compatibility
3. A little about me
● Senior Product / Community Manager
● ~15 years MySQL Experience
○ MySQL AB, Sun, Percona, Oracle
● Previously Product Manager for MySQL Server
4. A little about PingCAP
● Founded in April 2015 by 3 infrastructure
engineers
● Offices in China and North America
● Remote Friendly!
○ I work from here ➡
6. PingCAP.com
Our Product is the TiDB Platform
● TiDB Platform (Ti = Titanium)
○ TiDB (SQL Layer)
○ TiKV (Storage)
○ TiSpark (Apache Spark plugin to TiKV)
● Open source from Day 1
○ GA 1.0: October 2017
○ GA 2.0: April 2018
7. PingCAP.com
TiDB is a NewSQL Database
RDBMS NoSQL NewSQL
1970s 2010 2015
MySQL
PostgreSQL
Oracle
DB2...
Redis
HBase
Cassandra
MongoDB
Present
Google
Spanner
Google F1
TiDB
8. Common Use Cases
1. MySQL Scalability
2. Hybrid OLTP/OLAP Architecture
3. Unifying Data Storage/Management
14. PingCAP.com
TiKV: The Storage Foundation
RocksDB
Raft
Transaction
Txn KV API
Coprocessor
API
RocksDB
Raft
Transaction
Txn KV API
Coprocessor
API
RocksDB
Raft
Transaction
Txn KV API
Coprocessor
API
Raft
Group
Client
gRPC
TiKV Instance TiKV Instance TiKV Instance
gRPC gRPC
PD Cluster
15. PingCAP.com
TiDB: The SQL Layer
Node1 Node2 Node3 Node4
MySQL Network Protocol
SQL Parser
Cost-based Optimizer
Distributed Executor (Coprocessor)
ODBC/JDBC MySQL Client
Any ORM which
supports MySQL
TiDB
TiKV
21. PingCAP.com
Summary
● Compatibility with MySQL 5.7
○ Joins, subqueries, DML, DDL etc.
● On the roadmap:
○ Views, CTEs, Window Functions, GIS
● Missing:
○ Stored Procedures, Triggers, Events,
Fulltext pingcap.com
/docs/sql/mysql-compatibility/
22. PingCAP.com
Nuanced
● Some features work differently
○ Auto Increment
○ Optimistic Locking
● TiDB works better with smaller
transactions
○ Recommended to batch updates,
deletes, inserts to 5000 rows pingcap.com
/docs/sql/mysql-compatibility/