MySQL与TiDB基础知识类比

本文对比了MySQL与TiDB的存储模型,包括MySQL的表空间、页、区、段的概念,以及TiDB的RocksDB存储和Region管理。还讨论了两者在SQL执行过程和事务隔离级别上的差异,如MySQL的MVCC和TiDB的Percolator模型。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

温故而知新 可以为师矣

(想自学习编程的小伙伴请搜索圈T社区,更多行业相关资讯更有行业相关免费视频教程。完全免费哦!)

一、存储模型

MySQL

在这里插入图片描述

Each tablespace consists of database pages with a default size of 16KB. The pages are grouped into extents of size 1MB (64 consecutive pages). The “files” inside a tablespace are called segments in InnoDB.
Two segments are allocated for each index in InnoDB. One is for nonleaf nodes of the B-tree, the other is for the leaf nodes. Keeping the leaf nodes contiguous on disk enables better sequential I/O operations, because these leaf nodes contain the actual table data.

  • 表空间Tablespace(ibd文件)
  • 段Segment(一个索引2个段)
  • 区Extent(1MB):64个Page
  • 页Page(16KB):磁盘管理的最小单位

从示意图可以清晰的了解到MySQL的行数据Ro

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值