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 ...
随机推荐
- libpng的使用
zlib 适用于数据压缩的函式库,由Jean-loup Gailly (负责compression)和 Mark Adler (负责decompression)开发. zlib被设计成一个免费的.通用 ...
- PublicCMS 网站漏洞 任意文件写入并可提权服务器权限
PublicCMS是目前网站系统中第一个采用JAVA架构 TOMCAT+Apcche+Mysql数据库架构的CMS网站,开源,数据承载量大,可以承载到上千万的数据量,以及用户的网站并发可达到上千万的P ...
- UVA - 12230
#include <bits/stdc++.h> using namespace std; int n; double d; double p,l,v,ret,sum; ; /* 村庄A, ...
- Big Truck
Photo by Phil Whitehouse Your boss has hired you to drive a big truck, transporting items between tw ...
- 长沙Uber优步司机奖励政策(3月28日)
滴快车单单2.5倍,注册地址:http://www.udache.com/ 如何注册Uber司机(全国版最新最详细注册流程)/月入2万/不用抢单:http://www.cnblogs.com/mfry ...
- CSS实现简易的轮播图
<html> <head> <meta charset="UTF-8"> <title></title> <sty ...
- 谷歌js编码规范解析
http://alloyteam.github.io/JX/doc/specification/google-javascript.xm 阅读了谷歌js编码规范,我发现了很多,js的里面很多要注意的问 ...
- 【紫书】(UVa1347)Tour
继续考虑dp题目. 题意分析 其实这里只是更加仔细的做一个lrj的复读机(Orz 他分析了一个很重要的结果:如果是一个人从左到右再回来,并且每个点恰经过一次,那么等价于两个人从左到右每个点经过一次地遍 ...
- 通过 systemctl 设置自定义 Service
如果要在Linux 上设置一个开机自启,出现问题自动重启,并且有良好日志的程序,比较流行的方法有 supervisord.systemd,除此之外,还有 upstart.runit 等类似的工具. 但 ...
- Linux 简单socket实现UDP通信
服务器端 #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sy ...