码迷,mamicode.com
首页 > 数据库 > 详细

MYSQL 索引页 结构图

时间:2016-06-27 19:15:03      阅读:391      评论:0      收藏:0      [点我收藏+]

标签:

create table t( a int(11) not null auto_increment,b char(3) default null,primary key(a));
mysql> select * from t;
+----+------+
| a  | b    |
+----+------+
|  1 | aaa  |
|  2 | bbb  |
|  3 | ccc  |
|  4 | ddd  |
|  5 | eee  |
|  6 | fff  |
|  7 | ggg  |
|  8 | hhh  |
|  9 | iii  |
| 10 | jjj  |
+----+------+
10 rows in set (0.00 sec)
hexdump -C t.ibd

 技术分享

技术分享

 

锁结构与索引页对比

RECORD LOCKS space id 142 page no 3 n bits 80 index `PRIMARY` of table `test`.`t` trx id 31785 lock_mode X Record lock, heap no 1 PHYSICAL RECORD: n_fields 1; compact format; info bits 0 0: len 8; hex 73757072656d756d; asc supremum;; Record lock, heap no 2 PHYSICAL RECORD: n_fields 4; compact format; info bits 0 0: len 4; hex 80000001; asc ;; 1: len 6; hex 000000007c12; asc | ;; 2: len 7; hex 8f000001460110; asc F ;; 3: len 3; hex 616161; asc aaa;; Record lock, heap no 3 PHYSICAL RECORD: n_fields 4; compact format; info bits 0 0: len 4; hex 80000002; asc ;; 1: len 6; hex 000000007c13; asc | ;; 2: len 7; hex 90000001b70110; asc ;; 3: len 3; hex 626262; asc bbb;; Record lock, heap no 4 PHYSICAL RECORD: n_fields 4; compact format; info bits 0 0: len 4; hex 80000003; asc ;; 1: len 6; hex 000000007c18; asc | ;; 2: len 7; hex 93000001b80110; asc ;; 3: len 3; hex 636363; asc ccc;; Record lock, heap no 5 PHYSICAL RECORD: n_fields 4; compact format; info bits 0 0: len 4; hex 80000004; asc ;; 1: len 6; hex 000000007c19; asc | ;; 2: len 7; hex 940000020a0110; asc ;; 3: len 3; hex 646464; asc ddd;; Record lock, heap no 6 PHYSICAL RECORD: n_fields 4; compact format; info bits 0 0: len 4; hex 80000005; asc ;; 1: len 6; hex 000000007c1a; asc | ;; 2: len 7; hex 950000014b0110; asc K ;; 3: len 3; hex 656565; asc eee;; Record lock, heap no 7 PHYSICAL RECORD: n_fields 4; compact format; info bits 0 0: len 4; hex 80000006; asc ;; 1: len 6; hex 000000007c1b; asc | ;; 2: len 7; hex 960000014c0110; asc L ;; 3: len 3; hex 666666; asc fff;; Record lock, heap no 8 PHYSICAL RECORD: n_fields 4; compact format; info bits 0 0: len 4; hex 80000007; asc ;; 1: len 6; hex 000000007c20; asc | ;; 2: len 7; hex 99000001a10110; asc ;; 3: len 3; hex 676767; asc ggg;; Record lock, heap no 9 PHYSICAL RECORD: n_fields 4; compact format; info bits 0 0: len 4; hex 80000008; asc ;; 1: len 6; hex 000000007c21; asc |!;; 2: len 7; hex 9a0000014f0110; asc O ;; 3: len 3; hex 686868; asc hhh;; Record lock, heap no 10 PHYSICAL RECORD: n_fields 4; compact format; info bits 0 0: len 4; hex 80000009; asc ;; 1: len 6; hex 000000007c22; asc |";; 2: len 7; hex 9b000001500110; asc P ;; 3: len 3; hex 696969; asc iii;; Record lock, heap no 11 PHYSICAL RECORD: n_fields 4; compact format; info bits 0 0: len 4; hex 8000000a; asc ;; 1: len 6; hex 000000007c23; asc |#;; 2: len 7; hex 9c000001a40110; asc ;; 3: len 3; hex 6a6a6a; asc jjj;;

 

MYSQL 索引页 结构图

标签:

原文地址:http://www.cnblogs.com/zengkefu/p/5620840.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!