1、Dive Deep Into TiDBs Columnar Storage Engine万 PingCAPTiDB IntroductionTiDBis an open-source NewSQL database that supports HTAP workloads.It is MySQL compatible and features horizontal scalability,strong consistency,and high availability.And there is a serverless free TiDB available for every develop
2、ers at .Get ready in 20 seconds!How does TiDB handle HTAP workloads Dive deep into Delta Tree,the columnar storage engine of TiDB Cloud-native evolutionAgendaHow does TiDB handle HTAP workloads?Row storage engine,powered by RocksDBColumnar storage engine,named as Delta TreeTiDB IntroductionTiKVTiFla
3、sh TiKV is for OLTP,and TiFlash is for OLAP TiKV synchronizes data updates in real-time to TiFlash,via raft protocol.Reads on TiKV and TiFlash are strong consistent,with no delay.Read consistency is guaranteed by learner-read mechanism.Two storage engines work together to empower HTAP abilityOptimiz
4、er utilize both column and row storages.Dive deep into Delta Tree,the columnar storage engine of TiDBParquet is handy,isnt it enough?No!We need real-time update with high OPS.We need MVCC,to support transactional snapshot isolation.A typical write throughput of a TiFlash nodeColumnar Storage Engines
5、elect*from T with read_ts=65 Transform updates and deletes into upserts.MVCC ability get The basic ideas of Delta Tree Storage engine Split the data by PK range into many Segments Each segment is a small LSM-Tree,with only 2 layers Delta layer and write cache,i.e.memtable Stable layerThe basic ideas
6、 of Delta Tree Storage engine Segments are read in parallel,naturally.Fewer layers brings faster reads Fewer layers to sort merge Segments are compact in parallel in separate ranges,brings smaller write amplificationA typical write amplificationThe basic ideas of Delta Tree Storage engine Column fil