原文地址:https://stackoverflow.com/questions/47680213/what-are-the-current-differences-between-myisam-and-innodb-storage-engines-speci

Your assumption that MyISAM has been receiving new development is not correct. MyISAM is not receiving any significant new development. MySQL is clearly moving in the direction of phasing out MyISAM, and using MyISAM is discouraged.

Oracle Corp. has not announced any specific date or version by which they will remove MyISAM. My guess is that MyISAM will never be fully removed, because there are too many sites that wouldn't be able to upgrade, without doing expensive testing to make sure their specific app won't experience any regression issues by converting to InnoDB.

But you might notice that in the MySQL 5.7 manual, the section on MyISAM has been demoted to Alternative Storage Engines, which should be a clue that it's receiving less priority.

In MySQL 5.7, MyISAM is still used for some of the system tables, like mysql.usermysql.db, etc. But new system tables introduced in 5.6 and 5.7 are InnoDB. All system tables are InnoDB in MySQL 8.0.

MyISAM still does not support any of the properties of ACID. There are no transactions, no consistency features, and no durable writes. See my answer to MyISAM versus InnoDB.

MyISAM still does not support foreign keys, for what it's worth. But I seldom see real production sites using foreign keys even with InnoDB.

MyISAM supports only table-level locking (except for some INSERT appending to the end of a table, as noted in the manual).

MySQL 5.7 supports both fulltext indexes and spatial indexes in both MyISAM and InnoDB. These features are not reasons to continue using MyISAM as they once were.

Both logical backup tools like mysqldump and physical backup tools like Percona XtraBackup can't back up MyISAM tables without acquiring a global lock.

You asked if you could create a variety of tables with different storage engines in the same schema. Yes, you can, and this is the same as it has been for many versions of MySQL.

You asked if you can join tables of different storage engines (by the way, tables don't need to be in the same schema to be joined). Yes, you can join such tables, MySQL takes care of all the details. This is the same as it has been for many versions of MySQL.

But some weird cases can come up when you do this, like what if you update a MyISAM table and an InnoDB table in a transaction, and then roll back? The changes in the InnoDB table are rolled back, but the changes in the MyISAM table are not rolled back, so your data integrity can be broken if you aren't careful. This is also the same as it has been for many versions of MySQL.

Cases where MyISAM has an advantage over InnoDB is a short list, and it's getting shorter.

  • Some table-scan queries and bulk inserts are faster in MyISAM. InnoDB is better at indexed searches.

  • MyISAM may use less storage space than the equivalent data stored in an uncompressedInnoDB table. You can further compact MyISAM tables with myisampack, but this makes the MyISAM table read-only.

    There are other options these days for compact storage of data in transactional storage engines, for example InnoDB table compression, or MyRocks.

  • SELECT COUNT(*) FROM MyTable queries (with no WHERE clause) are very fast in MyISAM, because the accurate count of rows is persisted in the MyISAM metadata. InnoDB (or other MVCC implementations) doesn't keep this count persisted, because every transaction viewing the table might "see" a different row count. Only a storage engine that has table-level locking and no transaction isolation like MyISAM, can optimize this case.

  • Auto-increment that numbers independently for each distinct value in another key column. Again, this requires table-level locking, so it's not supported in InnoDB.

    CREATE TABLE MyTable (
    group_id INT NOT NULL,
    seq_id INT NOT NULL AUTO_INCREMENT,
    PRIMARY KEY (group_id, seq_id)
    ) ENGINE=MyISAM;
  • It's still easy to move a MyISAM table from server to server, because the .MYD and .MYI files are self-contained. You can kind of do something similar with InnoDB tables, but you have to use the intricate feature of transportable tablespaces. But this easy-to-move-tables quality of MyISAM no longer works in MySQL 8.0, because of their new data dictionary feature.

  • Under certain load, MyISAM might be a better choice for internal_tmp_disk_storage_engine, which defaults to InnoDB in MySQL 5.7. If you run lots of queries that create temp tables on disk (in-memory temp tables won't benefit), it can put a strain on the InnoDB engine. But you'd have to have a high query rate for this to matter, and if your queries create so many temp tables on disk, you should try to optimize the queries differently.

  • MyISAM allows you to set multiple key caches, and define caches for specific tables. But the MyISAM key caches are only for index structures, not for data.

References:

https://www.percona.com/blog/2016/10/11/mysql-8-0-end-myisam/

https://www.percona.com/blog/2017/12/04/internal-temporary-tables-mysql-5-7/

http://jfg-mysql.blogspot.com/2017/08/why-we-still-need-myisam.html

中文文章非常好:http://blog.51cto.com/13126942/2043972

the current differences between MyISAM and InnoDB storage engines的更多相关文章

  1. MyISAM to InnoDB: Why and How(MYSQL官方译文)

    原文地址:https://www.mysql.com/why-mysql/presentations/myisam-2-innodb-why-and-how/ MySQL使用一个插拔式的存储引擎架构, ...

  2. MySQL中MyISAM和InnoDB两种主流存储引擎的特点

    一.数据库引擎(Engines)的概念 MySQ5.6L的架构图: MySQL的存储引擎全称为(Pluggable Storage Engines)插件式存储引擎.MySQL的所有逻辑概念,包括SQL ...

  3. MySQL 存储引擎(MyISAM、InnoDB、NDBCluster)

    前言 MySQL 的存储引擎可能是所有关系型数据库产品中最具有特色的了,不仅可以同时使用多种存储引擎,而且每种存储引擎和MySQL之间使用插件方式这种非常松的耦合关系. 由于各存储引擎功能特性差异较大 ...

  4. mysql架构与存储引擎 (Myisam与Innodb)

    mysql抽象架构:可以分为SQL Layer和Storage Engine Layer mysql的engine层是基于表的,不是基于库的,创建表的语句可以指定engine Mysql的架构 Mys ...

  5. MyISAM和InnoDB

    MyISAM和InnoDB MyISAM MyISAM使用B+tree作为索引结构,叶节点存放的是数据地址. MyISAM不支持事务和外键. MyISAM是表锁,对数据库写操作时会锁住整个表,效率低. ...

  6. 白话讲MyIsam和InnoDB的区别

    "MyISAM类型不支持事务处理等高级处理,而InnoDB类型支持"这是网上对MyISAM和InnoDB的解释,很抽象吧,我们用白话的方式解释一下其实也比较简单所谓事务处理,就是原 ...

  7. MySQL存储引擎之Myisam和Innodb总结性梳理

    Mysql有两种存储引擎:InnoDB与Myisam,下表是两种引擎的简单对比   MyISAM InnoDB 构成上的区别: 每个MyISAM在磁盘上存储成三个文件.第一个 文件的名字以表的名字开始 ...

  8. msql数据迁移,myisam及innoDB

    直接迁移数据库文件. 一.MySQL数据库文件介绍 MySQL的每个数据库都对应存放在一个与数据库同名的文件夹中,MySQL数据库文件包括MySQL所建数据库文件和MySQL所用存储引擎创建的数据库文 ...

  9. myisam、innodb存储引擎比较

    MYSQL表类型(存储引擎) 1.概述 MySQL数据库其中一个特性是它的存储引擎是插件式的.用户可以根据应用需要选择存储引擎.Mysql默认支持多种存储引擎,以适用各种不同的应用需要.默认情况下,创 ...

随机推荐

  1. 2017 ACM/ICPC Asia Regional Qingdao Online解题报告(部分)

    HDU 6206 Apple 题意: 给出四个点的坐标(每个点的坐标值小于等于1,000,000,000,000),问最后一个点是否在前三个点组成的三角形的外接圆内,是输出Accept,否输出Reje ...

  2. API 接口返回值

    API 接口返回值 https://blog.csdn.net/baple/article/details/52925772

  3. noip之后的一些感受

    你经历过绝望吗,那种希望完全破碎,眼前看不到光亮,不知道下一步怎么走,不知道接下来应该如何生活的那种绝望? 我经历过. 2018.11.12 下午 秦皇岛到石家庄的高铁上 听着同学兴高采烈的讨论,自己 ...

  4. Spring之Bean的注入

    Bean的配置中介绍的是Bean声明问题,在哪声明怎么声明的问题.Bean的注入是怎么实例化,怎么注入的问题.Bean注入的方式有两种,一种是在XML中配置,另一种则是使用注解的方式注入. 一.XML ...

  5. python的类变量与实例变量以及__dict__属性

    关于Python的实例变量与类变量,先来看一段可能颠覆世界观的例子 #!/usr/bin/env python # -*- coding: utf_8 -*- # Date: 2016年10月10日 ...

  6. AngularJS+Ionic开发-2.项目结构介绍

    使用上篇博客<开发环境搭建>中的命令创建完成IonicHelloWorld项目,在VSCode中的左侧,显示该项目的结构信息,如下图所示: 1 .sourcesmaps文件夹 调试状态的j ...

  7. Modular Inverse(zoj3609+欧几里德)

    Modular Inverse Time Limit: 2 Seconds      Memory Limit: 65536 KB The modular modular multiplicative ...

  8. 汇编语言--CPU资源和存储器(二)

    二.CPU资源和存储器 需要访问的硬件资源主要有:CPU内部资源.存储器和I/O端口. 1.寄存器组 (1)16位寄存器组 16位CPU所含有的寄存器有(见图2.1中16位寄存器部分): 4个数据寄存 ...

  9. python学习之老男孩python全栈第九期_day001作业

    1.使用while循环输入 1 2 3 4 5 6     8 9 10 count = 0 while count <= 9: count += 1 if count == 7:continu ...

  10. Java并发编程(一)线程定义、状态和属性

    一 .线程和进程 1. 什么是线程和进程的区别: 线程是指程序在执行过程中,能够执行程序代码的一个执行单元.在java语言中,线程有四种状态:运行 .就绪.挂起和结束. 进程是指一段正在执行的程序.而 ...