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 ...
随机推荐
- Redis缓存数据库的安装与配置(3)
3 Redis主动同步设置方法 Redis主从同步 1.Redis主从同步特点 一个master可以拥有多个slave 多个slave可以连接同一个master,还可以连接到其他slave 主从复制不 ...
- Python3爬虫(十三) 爬取动态页之Selenium
Infi-chu: http://www.cnblogs.com/Infi-chu/ Python提供了很多模拟浏览器运行的库,比如:Selenium.Splash等 1.常用的引用 from sel ...
- Python3爬虫(八) 数据存储之TXT、JSON、CSV
Infi-chu: http://www.cnblogs.com/Infi-chu/ TXT文本存储 TXT文本存储,方便,简单,几乎适用于任何平台.但是不利于检索. 1.举例: 使用requests ...
- Educational Codeforces Round 47 (Rated for Div. 2) :B. Minimum Ternary String
题目链接:http://codeforces.com/contest/1009/problem/B 解题心得: 题意就是给你一个只包含012三个字符的字符串,位置并且逻辑相邻的字符可以相互交换位置,就 ...
- The Road to learn React书籍学习笔记(第四章)
高级React组件 本章将重点介绍高级 React 组件的实现.我们将了解什么是高阶组件以及如何实现它们.此外,我们还将深入探讨 React 中更高级的主题,并用它实现复杂的交互功能. 引用 DOM ...
- python2.7练习小例子(十四)
14):题目:利用条件运算符的嵌套来完成此题:学习成绩>=90分的同学用A表示,60-89分之间的用B表示,60分以下的用C表示. 程序分析:程序分析:(a>b)?a:b这 ...
- (转) Sqoop使用实例讲解
原博客地址:http://blog.csdn.net/evankaka 摘要:本文主要讲了笔者在使用sqoop过程中的一些实例 一.概述与基本原理 Apache Sqoop(SQL-to-Hadoop ...
- python的正则表达一
一.常用的正则表达式 1.了解正则表达式 正则表达式是对字符串操作的一种逻辑公式,就是用事先定义好的一些特定字符.及这些特定字符的组合,组成一个“规则字符串”,这个“规则字符串”用来表达对字符串的一种 ...
- Delphi实例之绘制正弦函数图像
Delphi实例之绘制正弦函数图像 unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphic ...
- 使用polarssl进行RSA加密解密
RSA算法的原理就不提了,网上有很多介绍的文章,因为项目中使用RSA加密,所以需要找一个RSA加密的算法,之前尝试过使用Crypto++库,无奈Crypto++其中使用了大量的模版,各种继承,看着头大 ...