Any gotchas at all with converting from MyISAM to InnoDB?
Q:
I'm ready to move from MyISAM to InnoDB but wanted to know if there was a full list of things to look for? For example, I haven't seen any list mention that running DISABLE KEYS on an InnoDB table will throw a warning, except the manual page for ALTER TABLE. It's that kind of thing I need to know about before converting over. I thought I'd be fine with my queries but apparently not.
A:
Here are some gotchas
Memory Usage
MyISAM
- only caches index pages.
- shared keycache (sized by key_buffer_size).
- You can also set up dedicated keycache, one or more tables per cache table.
InnoDB
- caches data pages and index pages.
- one buffer pool and one size before MySQL 5.5
- 1 or more buffer pools starting with MySQL 5.5
FULLTEXT Indexes
MyISAM
- Supports FULLTEXT indexes
InnoDB
- Before MySQL 5.6, no
- Starting with MySQL 5.6, yes, but still in beta
This means you cannot convert MyISAM to InnoDB. To locate which MyISAM tables have a FULLTEXT index run this query:
select tbl.table_schema,tbl.table_name from(select table_schema,table_name
from information_schema.tables
where engine='MyISAM'and table_schema NOTIN('information_schema','mysql')) tbl
INNERJOIN(select table_schema,table_name
from information_schema.statisticswhere index_type='FULLTEXT') ndx
USING(table_schema,table_name);
Whatever comes out of this query cannot be converted to InnoDB until MySQL 5.6 goes GPL
OPTIMIZE TABLE
MyISAM
- The MyISAM table is shrunk
- ANALYZE TABLE runs index statistics on all indexes
InnoDB
- ANALYZE TABLE is totally useless because index stats are always being recollected
- With innodb_file_per_table disabled, ibdata1 will grow bigger
- With innodb_file_per_table enabled, tablespace (.ibd file) is shrunk
参考:
http://dba.stackexchange.com/questions/10407/any-gotchas-at-all-with-converting-from-myisam-to-innodb
Any gotchas at all with converting from MyISAM to InnoDB?的更多相关文章
- the current differences between MyISAM and InnoDB storage engines
原文地址:https://stackoverflow.com/questions/47680213/what-are-the-current-differences-between-myisam-an ...
- MyISAM和InnoDB
MyISAM和InnoDB MyISAM MyISAM使用B+tree作为索引结构,叶节点存放的是数据地址. MyISAM不支持事务和外键. MyISAM是表锁,对数据库写操作时会锁住整个表,效率低. ...
- 白话讲MyIsam和InnoDB的区别
"MyISAM类型不支持事务处理等高级处理,而InnoDB类型支持"这是网上对MyISAM和InnoDB的解释,很抽象吧,我们用白话的方式解释一下其实也比较简单所谓事务处理,就是原 ...
- MySQL存储引擎之Myisam和Innodb总结性梳理
Mysql有两种存储引擎:InnoDB与Myisam,下表是两种引擎的简单对比 MyISAM InnoDB 构成上的区别: 每个MyISAM在磁盘上存储成三个文件.第一个 文件的名字以表的名字开始 ...
- msql数据迁移,myisam及innoDB
直接迁移数据库文件. 一.MySQL数据库文件介绍 MySQL的每个数据库都对应存放在一个与数据库同名的文件夹中,MySQL数据库文件包括MySQL所建数据库文件和MySQL所用存储引擎创建的数据库文 ...
- myisam、innodb存储引擎比较
MYSQL表类型(存储引擎) 1.概述 MySQL数据库其中一个特性是它的存储引擎是插件式的.用户可以根据应用需要选择存储引擎.Mysql默认支持多种存储引擎,以适用各种不同的应用需要.默认情况下,创 ...
- MySQL中MyISAM和InnoDB的区别
MyISAM和InnoDB的区别 MySQL默认采用的是MyISAM. MyISAM不支持事务,而InnoDB支持.InnoDB的AUTOCOMMIT默认是打开的,即每条SQL语句会默认被封装成一个事 ...
- 常用mysql数据库引擎——MyISAM和InnoDB区别
背景: 昨天做项目时,发现使用事务后回滚不了,后来把数据库引擎从MyISAM换成InnoDB后果断好了,如下图: 正文: MyISAM和InnoDB是mysql常用的数据库引擎,他们的区别如下: 数据 ...
- MySQL两种表存储结构MyISAM和InnoDB的性能比较测试
转载 http://www.jb51.net/article/5620.htm MySQL支持的两种主要表存储格式MyISAM,InnoDB,上个月做个项目时,先使用了InnoDB,结果速度特别慢,1 ...
随机推荐
- centos编译安装rabbitmq
安装环境 [root@VM_12_50_centos rabbitmq]# uname -a Linux VM_12_50_centos 3.10.0-514.21.1.el7.x86_64 #1 S ...
- kylin实战系列(一)
kylin实战系列(一) 把之前kylin的实践小结一下,以备以后查看.
- kafka单机部署文档
单机Kafka部署文档 最简单的使用方式,单机,使用自带的zookeeper 1.解压 下载地址:http://pan.baidu.com/s/1i4K2pXr tar –zxvf kafka_2.1 ...
- android staido 断点遇到的坑
今天排查数据布点问题,发现sd卡上面的文件莫名消失. 怎么可能?系统不可能删除你的文件,但是我调试,删除文件的代码, 一直都没有执行啊. 后来发现,子线程里面代码,android stadio 可能断 ...
- leetcode 笔记5 single number
question: Given an array of integers, every element appears twice except for one. Find that single o ...
- redis学习资料汇总
redis学习资料汇总 2017年01月07日 22:10:37 阅读数:281 转载:http://blog.csdn.net/wtyvhreal/article/details/50427627 ...
- jmeter常用的内置变量
1. vars API:http://jmeter.apache.org/api/org/apache/jmeter/threads/JMeterVariables.html vars.get(& ...
- Accept 惊群现象测试perl脚本
$uname -a Linux debian-11-34 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt9-3~deb8u1 (2015-04-24) x86_64 G ...
- VS2010使用NuGet程序包管理器
使用C#过程中经常需要使用一些扩展包,例如sqlite,json解析等. VS2010自带了一个扩展管理器,里面可以下载到AStyle,Visual Assit等有用的插件. VS2010中点击[工具 ...
- OpenCV入门:(一:安装与配置)
看到的不是自己的,只有写下来的才是自己的,上次接触OpenCV实在三个月前,亢奋的看完了OpenCV自带的入门文档,觉得对图形处理有了一点点了解,现在三个月过去了,由于学习需要,想深入了解OpenCV ...