http://www.tocker.ca/categories/myisam

Converting MyISAM to InnoDB and a lesson on variance

I'm about to start working through converting a large MySQL installation to InnoDB. For the particular use case durability is desired, and with MyISAM a loss of power almost certainly guarantees data loss. Durability is not available as an option.

So the normal question people ask is.. okay, what do I pay for this feature?

I think if you are looking at the workload in question I actually believe InnoDB will perform better overall. Row-level locking, multiversion concurrency control, and the correct selection of hardware (fast-disks with a RAID controller + batter backed write cache) will really help it shine.

But my problem is that InnoDB could be better in 9 situations, and worse in 1. What matters more than anything else is performance regressions. That is...

"Our Customers Feel the Variance, Not the Mean" - a key concept in Six Sigma.

The way I like to explain this, is that if we were to go to a restaurant and order the same meal - or go to Toyota and order the same car, we should receive the same product. I can't get the equivalent to a race car and you get a Trabant. Nor can we allow some queries that were already fast enough get faster, and other queries become intolerably slower.

So what I am actively trying to do is identify situations where MyISAM will be faster than InnoDB. And so far I have on my watch list:

  1. Table Scans - MyISAM data is far more compact, and typically table scans need to examine far less data.
  2. Index Scans - In InnoDB, indexes will contain multiple versionsand typically be much larger.
  3. Inserts - MyISAM has a special optimization where it can just insert into the end of a table. I think even with the battery backed write cache this will be hard to beat.
  4. Single-threaded workloads - maybe there's an hourly cron that in InnoDB will take significantly longer. InnoDB really performs better in concurrent workloads.

Facebook and Percona have previously written about the importance of variance reduction as well.

I should also note that durability is not the only reason to use InnoDB. Operational tasks like backups become much easier. But that's the subject for a different post 

situations where MyISAM will be faster than InnoDB的更多相关文章

  1. MySQL数据库锁机制之MyISAM引擎表锁和InnoDB行锁详解

    转 http://blog.csdn.net/hsd2012/article/details/51112009 转 http://blog.csdn.net/e421083458/article/de ...

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

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

  3. the current differences between MyISAM and InnoDB storage engines

    原文地址:https://stackoverflow.com/questions/47680213/what-are-the-current-differences-between-myisam-an ...

  4. Mysql 存储引擎中InnoDB与Myisam的主要区别

    一直以为我spring事物没有配置好,结果发现是mysql的表本身设置成了Myisam 引擎.改成innodb就支持事物了. 1, 事务处理 innodb 支持事务功能,myisam 不支持. Myi ...

  5. Mysql 存储引擎 InnoDB与Myisam的主要区别

    MySQL默认采用的是MyISAM. 1,事务处理 innodb 支持事务功能,myisam 不支持. Myisam 的执行速度更快,性能更好. MyISAM不支持事务,而InnoDB支持.InnoD ...

  6. Mysql更换MyISAM存储引擎为Innodb的操作记录

    一般情况下,mysql会默认提供多种存储引擎,可以通过下面的查看: 1)查看mysql是否安装了innodb插件.通过下面的命令结果可知,已经安装了innodb插件. mysql> show p ...

  7. MyISAM 和InnoDB 的区别.(存储,索引, 事务, 锁)

    MyISAM类型的表强调的是性能,但是不支持事务.及外部键等高级功能. MySQL默认采用的是MyISAM. MyISAM不支持事务,而InnoDB支持.InnoDB的AUTOCOMMIT默认是打开的 ...

  8. myisam、innodb存储引擎比较

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

  9. MySQL中MyISAM和InnoDB的区别

    MyISAM和InnoDB的区别 MySQL默认采用的是MyISAM. MyISAM不支持事务,而InnoDB支持.InnoDB的AUTOCOMMIT默认是打开的,即每条SQL语句会默认被封装成一个事 ...

随机推荐

  1. Java学习——开端

    学号 <Java程序设计>第1周学习总结(1) 教材学习内容总结(第一章) Java最早是由Sun公司研发,原称Oak(橡树),开发者之一的James Gosling被尊称为Java之父. ...

  2. poj2524-Ubiquitous Religions

    C - Ubiquitous Religions Time Limit: 5000 MS Memory Limit: 65536 KB 64-bit integer IO format: %I64d ...

  3. BZOJ4707 : B君的技巧

    建立线段树,设$f[x][l][r]$表示当前考虑$x$点,最左端是$l$,最右端是$r$的最少代价. 如果$a$在$x<<1$,$d$在$x<<1|1$, 设$g[a][c] ...

  4. AngularJS学习笔记之directive—scope选项与绑定策略

    From:http://www.linuxidc.com/Linux/2015-05/116924.htm scope:{}使指令与外界隔离开来,使其模板(template)处于non-inherit ...

  5. hadoop 流streaming跑python程序

    先放上命令: hadoop jar /usr/hadoop-/contrib/streaming/hadoop-streaming-.jar -mapper mapper.py -file mappe ...

  6. YSLOW

    什么是YSlow? YSlow是Yahoo发布的一款基于FireFox的插件. 如何安装YSlow? 安装YSlow必须首先先安装 Firebug,然后下载YSlow,再对其安装. YSlow有什么用 ...

  7. There was an internal API error.

    1.一开始以为是用了 iOS8的API, 抱着不相信的态度,我搜到了一条原因,可能是没有选择对开发者账号或需要 cmd+shift+k 来 clean 一下,无效. 2.又继续盯着这个问题,才发现我的 ...

  8. SDL2.0学习

    http://www.ffmpeg.org/download.html http://doc.okbase.net/leixiaohua1020/archive/110977.html  //视频 h ...

  9. [CareerCup] 15.5 Denormalization 逆规范化

    15.5 What is denormalization? Explain the pros and cons. 逆规范化Denormalization是一种通过添加冗余数据的数据库优化技术,可以帮助 ...

  10. 三种线程不安全现象描述(escaped state以及hidden mutable state)

    hidden mutable state和escaped state是两种线程不安全问题:两者原因不同,前者主要是由于类成员变量中含有其他对象的引用,而这个引用是immutable的:后者是成员方法的 ...