Chinaunix首页 | 论坛 | 博客
  • 博客访问: 569102
  • 博文数量: 86
  • 博客积分: 2581
  • 博客等级: 少校
  • 技术积分: 793
  • 用 户 组: 普通用户
  • 注册时间: 2009-01-05 20:09
文章分类

全部博文(86)

文章存档

2009年(86)

我的朋友

分类: Mysql/postgreSQL

2009-08-17 12:47:21


自己做的小测试:

测试表结构crc,word
+-------+------------------+------+-----+---------+-------+
| Field | Type             | Null | Key | Default | Extra |
+-------+------------------+------+-----+---------+-------+
| word  | varchar(50)      | YES  | MUL | NULL    |       |
| crc   | int(10) unsigned | YES  | MUL | NULL    |       |
+-------+------------------+------+-----+---------+-------+

+---------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Table   | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+---------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| crctest |          1 | crcidx   |            1 | crc         | A         |      479829 |     NULL | NULL   | YES  | BTREE      |         |
| crctest |          1 | wordidx  |            1 | word        | A         |      479829 |       10 | NULL   | YES  | BTREE      |         |
+---------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+



myisam直接插入:          3.83s
myisam插入+enable keys: 0.64+3.26s=3.90s

innodb直接插入:          50.69s
myisam插入+create keys: 4.55+45.58+60.82s = 110.95s


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