High Performance MySQL, Third Edition
by Baron Schwartz, Peter Zaitsev, and Vadim Tkachenko

http://dev.mysql.com/doc/refman/5.7/en/

https://zh.wikipedia.org/wiki/ISAM

https://en.wikipedia.org/wiki/ISAM

ISAM (an acronym for Indexed Sequential Access Method) is a method for indexing data for fast retrieval.

索引顺序存取方法(ISAM, Indexed Sequential Access Method)最初是IBM公司发展起来的一个文件系统,可以连续地(按照他们进入的顺序)或者任意地(根据索引)记录任何访问。每个索引定义了一次不同排列的记录。现在这个概念用在许多场合:

  • 特指IBM公司的ISAM产品
  • 数据库系统中提供用户接口从数据文件中检索数据。
  • 通常指,数据库的索引,这种索引被大多数数据库所采用,包括关系数据库或其它。

在ISAM系统,数据组织成有固定长度的记录,按顺序存储的。

In an ISAM system, data is organized into records which are composed of fixed length fields. Records are stored sequentially, originally to speed access on a tape system. A secondary set of hash tables known as indexes contain "pointers" into the tables, allowing individual records to be retrieved without having to search the entire data set. This is a departure from the contemporaneous navigational databases, in which the pointers to other data were stored inside the records themselves. The key improvement in ISAM is that the indexes are small and can be searched quickly, thereby allowing the database to access only the records it needs. Additionally modifications to the data do not require changes to other data, only the table and indexes in question.

When an ISAM file is created, index nodes are fixed, and their pointers do not change during inserts and deletes that occur later (only content of leaf nodes change afterwards). As a consequence of this, if inserts to some leaf node exceed the node's capacity, new records are stored in overflow chains. If there are many more inserts than deletions from a table, these overflow chains can gradually become very large, and this affects the time required for retrieval of a record.[4]

Table 16.2 MyISAM Storage Engine Features

Storage limits 256TB Transactions No Locking granularity Table
MVCC No Geospatial data type support Yes Geospatial indexing support Yes
B-tree indexes Yes T-tree indexes No Hash indexes No
Full-text search indexes Yes Clustered indexes No Data caches No
Index caches Yes Compressed data Yes[a] Encrypted data[b] Yes
Cluster database support No Replication support[c] Yes Foreign key support No
Backup / point-in-time recovery[d] Yes Query cache support Yes Update statistics for data dictionary Yes

[a] Compressed MyISAM tables are supported only when using the compressed row format. Tables using the compressed row format with MyISAM are read only.

[b] Implemented in the server (via encryption functions). Data-at-rest tablespace encryption is available in MySQL 5.7 and higher.

[c] Implemented in the server, rather than in the storage engine.

[d] Implemented in the server, rather than in the storage engine.

Each MyISAM table is stored on disk in three files. The files have names that begin with the table name and have an extension to indicate the file type. An .frm file stores the table format. The data file has an .MYD (MYData) extension. The index file has an .MYI(MYIndex) extension.

Table 15.1 InnoDB Storage Engine Features

Storage limits 64TB Transactions Yes Locking granularity Row
MVCC Yes Geospatial data type support Yes Geospatial indexing support Yes[a]
B-tree indexes Yes T-tree indexes No Hash indexes No[b]
Full-text search indexes Yes[c] Clustered indexes Yes Data caches Yes
Index caches Yes Compressed data Yes[d] Encrypted data[e] Yes
Cluster database support No Replication support[f] Yes Foreign key support Yes
Backup / point-in-time recovery[g] Yes Query cache support Yes Update statistics for data dictionary Yes

[a] InnoDB support for geospatial indexing is available in MySQL 5.7.5 and higher.

[b] InnoDB utilizes hash indexes internally for its Adaptive Hash Index feature.

[c] InnoDB support for FULLTEXT indexes is available in MySQL 5.6.4 and higher.

[d] Compressed InnoDB tables require the InnoDB Barracuda file format.

[e] Implemented in the server (via encryption functions). Data-at-rest tablespace encryption is available in MySQL 5.7 and higher.

[f] Implemented in the server, rather than in the storage engine.

[g] Implemented in the server, rather than in the storage engine.

Storage engines use B-Tree indexes in various ways, which can affect performance. For instance, MyISAM uses a prefix compression technique that makes indexes smaller,but InnoDB leaves values uncompressed in its indexes. Also, MyISAM indexes refer to the indexed rows by their physical storage locations, but InnoDB refers to them by their primary key values. Each variation has benefits and drawbacks.
The general idea of a B-Tree is that all the values are stored in order, and each leaf page is the same distance from the root.
 

B-tree indexes的更多相关文章

  1. B-tree R-tree B+-tree indexes 索引顺序存取方法 ISAM MySQL实现拓展ISAM为MyISAM

    High Performance MySQL, Third Edition by Baron Schwartz, Peter Zaitsev, and Vadim Tkachenko http://d ...

  2. CMU Database Systems - Indexes

    这章主要描述索引,即通过什么样的数据结构可以更加快速的查询到数据 介绍Hash Tables,B+tree,SkipList 以及索引的并行访问 Hash Tables hash tables可以实现 ...

  3. 你需要知道的MySQL开源存储引擎TokuDB

    在四月份的Percona Live MySQL会议上, TokuDB庆祝自己成为开源存储引擎整一周年.我现在仍能记得一年前它刚创建时的官方声明与对它的期望.当时的情况非常有意思,因为它拥有帮助MySQ ...

  4. [MySQL FAQ]系列 — 为什么InnoDB表要建议用自增列做主键

    我们先了解下InnoDB引擎表的一些关键特征: InnoDB引擎表是基于B+树的索引组织表(IOT): 每个表都需要有一个聚集索引(clustered index): 所有的行记录都存储在B+树的叶子 ...

  5. TokuDB介绍——本质是分形树(一个叶子4MB)+缓存减少写操作

    其性能特点见:http://www.cnblogs.com/billyxp/p/3567421.html TokuDB 是一个高性能.支持事务处理的 MySQL 和 MariaDB 的存储引擎.Tok ...

  6. ocp 1Z0-043 131-205题解析

    131. Which three methods can you use to run an Automatic Database Diagnostic Monitor (ADDM) analysis ...

  7. MySQL没有备份怎么恢复被drop的表(利用undrop-for-innodb)

    介绍:     也许大家都难以理解,这么重要的数据为啥不备份(或者备份不可用)?而且还任性的drop table了.显然有备份是最好的,但是它们并不总是可用的.这种情况令人恐惧,但并非毫无希望.在许多 ...

  8. 没有备份怎么恢复被drop的表(利用undrop-for-innodb)

    介绍:     也许大家都难以理解,这么重要的数据为啥不备份(或者备份不可用)?而且还任性的drop table了.显然有备份是最好的,但是它们并不总是可用的.这种情况令人恐惧,但并非毫无希望.在许多 ...

  9. mysql中InnoDB表为什么要建议用自增列做主键

    InnoDB引擎表的特点 1.InnoDB引擎表是基于B+树的索引组织表(IOT) 关于B+树 (图片来源于网上) B+ 树的特点: (1)所有关键字都出现在叶子结点的链表中(稠密索引),且链表中的关 ...

  10. 一次MySQL线上慢查询分析及索引使用

    本文由作者郑智辉授权网易云社区发布. 0.前言 本文通过分析线上MySQL慢查询日志,定位出现问题的SQL,进行业务场景分析,结合索引的相关使用进行数据库优化.在两次处理问题过程中,进行的思考. 1. ...

随机推荐

  1. 【代码审计】711cms_V1.0.5前台XSS跨站脚本漏洞分析

      0x00 环境准备 711CMS官网: https://www.711cms.com/ 网站源码版本:711CMS 1.0.5 正式版(发布时间:2018-01-20) 程序源码下载:https: ...

  2. Linux CentOS6.5上搭建环境遇到的问题

    1.卸载CentOS自带的JDK 查看centos上 安装的jdk:rpm -qa|grep jdk 出现如下: java-1.7.0-openjdk-1.7.0.45-2.4.3.3.el6.x86 ...

  3. Eclipse警告:The serializable class XXX does not declare a static final serialVersionUID field of type long

    serialVersionUID作用: 序列化时为了保持版本的兼容性,即在版本升级时反序列化仍保持对象的唯一性. 在Eclipse中可以自动生成,有两种生成方式: 一个是默认的1L,比如:privat ...

  4. 【Java并发编程五】信号量

    一.概述 技术信号量用来控制能够同时访问某特定资源的活动的数量,或者同时执行某一给定操作的数据.计数信号量可以用来实现资源池或者给一个容器限定边界. 信号量维护了一个许可集,许可的初始量通过构造函数传 ...

  5. struts.xml文件中配置tiles.xml

    Apache Tiles是一个JavaEE应用的页面布局框架.Tiles框架提供了一种模板机制,可以为某一类页面定义一个通用的模板,该模板定义了页面的整体布局.布局由可以复用的多个块组成,每个页面可以 ...

  6. 关于丢失或者损坏/etc/fstab文件后的一些探讨

    1.模仿,假设不小心删除了/etc/fstab文件:大家都知道,Linux系统启动的时候会读取该文件来挂载分区,如果缺失该文件,系统一般不能正常启动. 2.采用reboot命令或者alt+ctrl+d ...

  7. 老树开新花:DLL劫持漏洞新玩法

    本文原创作者:丝绸之路 <img src="http://image.3001.net/images/20150921/14428044502635.jpg!small" t ...

  8. 纯css制作带三角(兼容所有浏览器)

    如何用 border 来制作三角. html 代码如下: 代码如下: <div class="arrow-up"></div> <div class= ...

  9. chorme 浏览器记住密码后input黄色背景处理

    使用chrome浏览器选择记住密码的账号,输入框会自动加上黄色的背景,有些设计输入框是透明背景的,需要去除掉这个黄色的背景: 方法1:阴影覆盖 input:-webkit-autofill { -we ...

  10. Internet Message Access Protocol --- IMAP协议

    https://en.wikipedia.org/wiki/Internet_Message_Access_Protocol   Internet Message Access Protocol