InnoDB和MyISAM区别_MySQL
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了InnoDB和MyISAM区别_MySQL,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3184字,纯文字阅读大概需要5分钟。
内容图文
![InnoDB和MyISAM区别_MySQL](/upload/InfoBanner/zyjiaocheng/573/4a76d82818ec4e88acfd6cd494be1ffc.jpg)
MyIASM是IASM表的新版本,有如下扩展:
·二进制层次的可移植性。
·NULL列索引。
·对变长行比ISAM表有更少的碎片。
·支持大文件。
·更好的索引压缩。
·更好的键吗统计分布。
·更好和更快的auto_increment处理。
以下是一些细节和具体实现的差别:
◆1.InnoDB不支持FULLTEXT类型的索引。
◆2.InnoDB 中不保存表的具体行数,也就是说,执行select count(*) from table时,InnoDB要扫描一遍整个表来计算有多少行,但是MyISAM只要简单的读出保存好的行数即可。注意的是,当count(*)语句包含where条件时,两种表的操作是一样的。
◆3.对于AUTO_INCREMENT类型的字段,InnoDB中必须包含只有该字段的索引,但是在MyISAM表中,可以和其他字段一起建立联合索引。
◆4.DELETE FROM table时,InnoDB不会重新建立表,而是一行一行的删除。
◆5.LOAD TABLE FROM MASTER操作对InnoDB是不起作用的,解决方法是首先把InnoDB表改成MyISAM表,导入数据后再改成InnoDB表,但是对于使用的额外的InnoDB特性(例如外键)的表不适用。
在高性能MYSQL上还说默认MYISAM,其实要看那个版本,我现在的默认就是InnoDB,手册上是这么说的:
InnoDB is a high-reliability and high-performance storage engine for MySQL. Starting with MySQL 5.5, it is the default MySQL storage engine. Key advantages of InnoDB include:
Its design follows the ACID model, with transactions featuring commit, rollback, and crash-recovery capabilities to protect user data.
Row-level locking and Oracle-style consistent reads increase multi-user concurrency and performance.
InnoDB tables arrange your data on disk to optimize common queries based on primary keys. Each InnoDB table has a primary key index called the clustered index that organizes the data to minimize I/O for primary key lookups.
To maintain data integrity, InnoDB also supports FOREIGN KEY referential-integrity constraints.
You can freely mix InnoDB tables with tables from other MySQL storage engines, even within the same statement. For example, you can use a join operation to combine data from InnoDB and MEMORY tables in a single query.
To determine whether your server supports InnoDB use the SHOW ENGINES statement.
Before MySQL 5.5.5, MyISAM is the default storage engine. (The default was changed to InnoDB in MySQL 5.5.5.) MyISAM is based on the older (and no longer available) ISAM storage engine but has many useful extensions.
Table 13.10. MyISAM Storage Engine Features
bitsCN.com
内容总结
以上是互联网集市为您收集整理的InnoDB和MyISAM区别_MySQL全部内容,希望文章能够帮你解决InnoDB和MyISAM区别_MySQL所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。