Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2466862
  • 博文数量: 225
  • 博客积分: 11622
  • 博客等级: 上将
  • 技术积分: 7358
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-18 10:05
个人简介

我们的生活是多么美好呀!!!!

文章存档

2013年(2)

2012年(9)

2011年(59)

2010年(8)

2009年(35)

2008年(112)

分类: Mysql/postgreSQL

2008-12-30 15:27:50

  上周服务器出了点问题..需要数据恢复.我所做的几个小东东的数据存储引擎因为使用了默认的innoDB存储引擎..产生不小的麻烦..囧…

首先看看我的MySql哪些存储引擎可用:

用show engines 语句


mysql> show engines;
+------------+---------+----------------------------------------------------------------+
| Engine | Support | Comment |
+------------+---------+----------------------------------------------------------------+
| MyISAM | YES | Default engine as of MySQL 3.23 with great performance |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables |
| InnoDB | DEFAULT | Supports transactions, row-level locking, and foreign keys |
| BerkeleyDB | NO | Supports transactions and page-level locking |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) |
| EXAMPLE | NO | Example storage engine |
| ARCHIVE | YES | Archive storage engine |
| CSV | NO | CSV storage engine |
| ndbcluster | NO | Clustered, fault-tolerant, memory-based tables |
| FEDERATED | YES | Federated MySQL storage engine |
| MRG_MYISAM | YES | Collection of identical MyISAM tables |
| ISAM | NO | Obsolete storage engine |
+------------+---------+----------------------------------------------------------------+
12 rows in set

比较常用的就是innoDB与MyISAM存储引擎了.我这里显示InnoDB是DEFAULT的

两种类型最主要的差别就是 InnoDB 支持事务处理与外键.而MyISAM不支持.因为MyISAM相对简单所以在效率上要优于InnoDB..小型应用使用MyISAM是不错的选择.

MyISAM表是保存成文件的形式,在跨平台的数据转移中使用MyISAM存储会省去不少的麻烦..

InnoDB所有的表都保存在同一个数据文件 ibdata1 中(也可能是多个文件,或者是独立的表空间文件),相对来说比较不好备份,免费的方案可以是拷贝数据文件、备份 binlog,或者用 mysqldump。

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