• 欢迎访问速搜资源吧,如果在网站上找不到你需要的资源,可以在留言板上留言,管理员会尽量满足你!

【速搜问答】MyISAM是什么

问答 admin 2个月前 (04-19) 57次浏览 已收录 0个评论

汉英对照:
Chinese-English Translation:

MyISAM是默认存储引擎(Mysql5.1前)。它基于更老的ISAM代码,但有很多有用的扩展。(注意MySQL 5.1不支持ISAM)。 每个MyISAM在磁盘上存储成三个文件,每一个文件的名字均以表的名字开始,扩展名指出文件类型。

MyISAM is the default storage engine (before mysql5.1). It is based on older ISAM code, but there are many useful extensions. (note that ISAM is not supported in MySQL 5.1). Each MyISAM is stored on disk as three files. The name of each file starts with the name of the table, and the extension indicates the file type.

MyISAM 是默认存储引擎(Mysql5.1 前)。它基于更老的 ISAM 代码,但有很多有用的扩展。(注意 MySQL 5.1 不支持 ISAM)。 每个 MyISAM 在磁盘上存储成三个文件,每一个文件的名字均以表的名字开始,扩展名指出文件类型。

MyISAM is the default storage engine (before mysql5.1). It is based on older ISAM code, but there are many useful extensions. (note that ISAM is not supported in MySQL 5.1). Each MyISAM is stored on disk as three files. The name of each file starts with the name of the table, and the extension indicates the file type.

.frm 文件存储表定义;·MYD (MYData)文件存储表的数据;.MYI (MYIndex)文件存储表的索引。

. frm file storage table definition; · MyD (mydata) file storage table data;. MYI (myindex) file storage table index.

简介

brief introduction

要明确表示你想要用一个 MyISAM 表格,请用 ENGINE 表选项指出来:

To make it clear that you want to use a MyISAM table, use the engine table option:

CREATE TABLE t (i INT) ENGINE = MYISAM;

CREATE TABLE t (i INT) ENGINE = MYISAM;

注释:老版本的 MySQL 使用 TYPE 而不是 ENGINE(例如,TYPE = MYISAM)。MySQL 5.1 为向下兼容而支持这个语法,但 TYPE 现在被轻视,而 ENGINE 是首先的用法。

Note: older versions of MySQL use type instead of engine (for example, type = MyISAM). MySQL 5.1 supports this syntax for backward compatibility, but type is now despised, and engine is the first use.

一般地,ENGINE 选项是不必要的;除非默认已经被改变了,InnoDB 是默认存储引擎(Mysql 5.1 后)。

Generally, the engine option is unnecessary; unless the default has been changed, InnoDB is the default storage engine (after MySQL 5.1).

你可以用 myisamchk 工具来检查或修复 MyISAM 表。请参阅 MySQL 5.1 参考手册 5.9.5.6 节,“使用 myisamchk 做崩溃恢复”。你也可以用 myisampack 来压缩 MyISAM 表,让它们占更少的空间。请参阅 MySQL 5.1 参考手册 8.2 节,“myisampack,产生压缩、只读的 MyISAM 表”。

You can use the myisamchk tool to check or repair the MyISAM table. Please refer to section 5.9.5.6 of MySQL 5.1 reference manual, “using myisamchk for crash recovery”. You can also use myisampack to compress MyISAM tables to make them take up less space. Please refer to Section 8.2 of MySQL 5.1 reference manual, “myisampack, generating compressed, read-only MyISAM tables”.

特征

Features

MyISAM 存储引擎的一些特征

Some features of MyISAM storage engine

1. 所有数据值先存储低字节。这使得数据机和操作系统分离。二进制轻便性的唯一要求是机器使用补码(如最近 20 年的机器有的一样)和 IEEE 浮点格式(在主流机器中也完全是主导的)。唯一不支持二进制兼容性的机器是嵌入式系统。这些系统有时使用特殊的处理器。

1. All data values store low bytes first. This separates the data machine from the operating system. The only requirement for binary portability is that machines use complement (as in the last 20 years) and IEEE floating-point format (which is also completely dominant in mainstream machines). The only machine that does not support binary compatibility is an embedded system. These systems sometimes use special processors.

先存储数据低字节并不严重地影响速度;数据行中的字节一般是未联合的,从一个方向读未联合的字节并不比从反向读更占用更多的资源。服务器上的获取列值的代码与其它代码相比并不显得时间紧。

Storing the low byte of data first does not seriously affect the speed; the bytes in the data row are generally unincorporated, and reading the unincorporated bytes from one direction does not occupy more resources than reading from the reverse direction. The code on the server to get the column value is not time intensive compared with other codes.

2.大文件(达 63 位文件长度)在支持大文件的文件系统和操作系统上被支持。

2. Large files (up to 63 bit file length) are supported on file systems and operating systems that support large files.

3. 当把删除和更新及插入混合的时候,动态尺寸的行更少碎片。这要通过合并相邻被删除的块,以及若下一个块被删除,就扩展到下一块来自动完成。

3. When deleting, updating and inserting are mixed, dynamic size rows are less fragmented. This is done automatically by merging adjacent deleted blocks and expanding to the next block if the next block is deleted.

7. NULL 值被允许在索引的列中。这个占每个键的 0-1 个字节。

7. Null value is allowed in the column of index. This is 0-1 bytes per key.

8. 所有数字键值以高字节为先被存储以允许一个更高地索引压缩。

8. All numeric key values are stored first with high byte to allow a higher index compression.

9. 当记录以排好序的顺序插入(就像你使用一个 AUTO_INCREMENT 列之时),索引树被劈开以便高节点仅包含一个键。这改善了索引树的空间利用率。

9. When records are inserted in a sorted order (as you would with an auto increment column), the index tree is split so that the high node contains only one key. This improves the space utilization of the index tree.

10.每表一个 AUTO_INCREMENT 列的内部处理。MyISAM 为 INSERT 和 UPDATE 操作自动更新这一列。这使得 AUTO_INCREMENT 列更快(至少 10%)。在序列顶的值被删除之后就不能再利用。(当 AUTO_INCREMENT 列被定义为多列索引的最后一列,可以出现重使用从序列顶部删除的值的情况)。AUTO_INCREMENT 值可用 ALTER TABLE 或 myisamch 来重置。

10. Internal processing of one auto increment column in each table. MyISAM automatically updates this column for insert and update operations. This makes the auto increment column faster (at least 10%). After the value at the top of the sequence is deleted, it cannot be reused. (when the auto increment column is defined as the last column of a multi column index, the value removed from the top of the sequence can be reused.). The auto increment value can be reset by alter table or myisamch.

11. 如果数据文件中间的表没有自由块了,在其它线程从表读的同时,你可以 INSERT 新行到表中。(这被认识为并发操作)。自由块的出现是作为删除行的结果,或者是用比当前内容多的数据对动态长度行更新的结果。当所有自由块被用完(填满),未来的插入又变成并发。

11. If the table in the middle of the data file has no free block, you can insert new rows into the table while other threads read from the table. (this is known as concurrent operations). Free blocks appear as a result of deleting rows or updating dynamic length rows with more data than the current content. When all free blocks are used up (filled), future inserts become concurrent.

12.你可以把数据文件和索引文件放在不同目录,用 DATA DIRECTORY 和 INDEX DIRECTORY 选项 CREATE TABLE 以获得更高的速度。

12. You can put data files and index files in different directories, and use the data directory and index directory options to create table for higher speed.


速搜资源网 , 版权所有丨如未注明 , 均为原创丨转载请注明原文链接:【速搜问答】MyISAM是什么
喜欢 (0)
[361009623@qq.com]
分享 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址