Start

Welcome to MySQL Oracle ABC, the SQL and Database training community!
This community was started from a technologies study memo. Now, supported by friends of our community, opened as a community site.
Please find information of the courses from the links and join the forum discussions.

最新博客

mysql InnoDB数据页结构Page Header

by fyangfyang 02 Mar 2015 08:17

Fields
Bytes Name
2 PAGE_N_DIR_SLOTS number of slots in page directory
2 PAGE_HEAP_TOP pointer to record heap top
2 PAGE_N_HEAP number of records in the heap
2 PAGE_FREE pointer to start of page free record list
2 PAGE_GARBAGE number of bytes in deleted records (delete flag 1)
2 PAGE_LAST_INSERT pointer to the last inserted record
2 PAGE_DIRECTION last insert direction: PAGE_LEFT, …
2 PAGE_N_DIRECTION number of consecutive inserts to the direction
2 PAGE_N_RECS number of user records on the page
//8 PAGE_MAX_TRX_ID highest id of a trx which may have modified
//0 PAGE_HEADER_PRIV_END end of private data structure of the page
2 PAGE_LEVEL level of the node in an index tree, 0 means leaf
8 PAGE_INDEX_ID index id where the page belongs.
10 PAGE_BTR_SEG_LEAF only when root page, segment begin pointer
10 PAGE_BTR_SEG_TOP only when root page, segment begin pointer
//10 PAGE_BTR_IBUF_FREE_LIST
//10 PAGE_BTR_IBUF_FREE_LIST_NODE

mysql InnoDB 文件数据页File Header结构

by fyangfyang 02 Mar 2015 08:16

Fields
Bytes Name
4 FIL_PAGE_SPACE_OR_CHKSUM (in < MySQL-4.0.14 tablespace id, otherwise checksum)
4 FIL_PAGE_OFFSET (offset in tablespace)
4 FIL_PAGE_PREV
4 FIL_PAGE_NEXT
8 FIL_PAGE_LSN (lsn of the end of the newest modification)
2 FIL_PAGE_TYPE
8 FIL_PAGE_FILE_FLUSH_LSN
4 FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID

mysql Char的存储

by fyangfyang 21 Feb 2015 15:30

MySQL 4.1开始CHR(N)是字符长度

  • 验证
    • char_length(str)
    • length(str)
    • hex(str)
  • 在可变长字符集中(gbk, utf8等),char是作为可变长类型存储

mysql Compressed、Dynamic行

by fyangfyang 21 Feb 2015 15:25

InnoDB Plugin之后提供两种格式Antelope和Barracuda

mysql 行溢出数据

by fyangfyang 21 Feb 2015 15:24

MySQL中行在Page中存储不下的时候,可以接着存放到Uncompressed BLOB Page中。这称为行溢出。


最新的Wiki


最近更新过的Wiki


Database Theory
Category nameThreadsPostsLast post
11by fyangfyang
07 Jun 2014 23:30Jump!
11by fyangfyang
07 Jun 2014 23:31Jump!
Oracle
Category nameThreadsPostsLast post
11by fyangfyang
07 Jun 2014 23:32Jump!
11by fyangfyang
07 Jun 2014 23:33Jump!
MySQL
Category nameThreadsPostsLast post
11by fyangfyang
07 Jun 2014 23:34Jump!
11by fyangfyang
07 Jun 2014 23:35Jump!

Show hidden

rss icon RSS: New threads | New posts

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License