Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1788894
  • 博文数量: 335
  • 博客积分: 4690
  • 博客等级: 上校
  • 技术积分: 4341
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-08 21:38
个人简介

无聊之人--除了技术,还是技术,你懂得

文章分类

全部博文(335)

文章存档

2016年(29)

2015年(18)

2014年(7)

2013年(86)

2012年(90)

2011年(105)

分类: Mysql/postgreSQL

2012-11-26 16:57:43

 

点击(此处)折叠或打开

  1. With InnoDB, either use autocommit=1, making each operation into a "transaction", or use BEGIN (START) and COMMIT to explicity bracket each set of statement(s) that make up a transaction. InnoDB can prevent many kinds of "deadlocks", and simply stall one transaction until it is safe to continue. Some deadlocks are easily detected after starting transactions, and lead to aborting one of the competing transactions; this ROLLBACK must be monitored for by the application. Still other situations can lead to hanging until a timeout (cf innodb_lock_wait_timeout, which defaults to 50 seconds).





MyISAM dates back to the '90s. It was designed to be simple and fast, while lacking important database features (ACID). InnoDB came along in the '00s. Most energy has gone into improving it. Today, InnoDB, (and Percona's Xtradb) are excellent engines. InnoDB recovers automatically after a crash. 

MyISAM's simplicity leads to very little overhead on disk. InnoDB's transactional semantics, MVCC, ROLLBACK, undo, etc, lead to a lot of disk overhead. 

MyISAM caches INDEX blocks in the "key_buffer". Data blocks are cached by the Operating system. InnoDB caches both data and indexes in the "buffer_pool". These lead to radically different tuning (see 70%). 


阅读(1924) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~