Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4212445
  • 博文数量: 291
  • 博客积分: 8003
  • 博客等级: 大校
  • 技术积分: 4275
  • 用 户 组: 普通用户
  • 注册时间: 2010-10-30 18:28
文章分类

全部博文(291)

文章存档

2017年(1)

2013年(47)

2012年(115)

2011年(121)

2010年(7)

分类: Mysql/postgreSQL

2011-04-11 16:46:07

从上面的语句看来mysiam的插入要比innodb快很多,但是innodb的删除却比myisam块

 
  1. mysql> INSERT INTO dns.domain_tmp(begin_ip,end_ip,pool_id,region_id) SELECT distinct c.begin_ip,c.end_ip,t.pool_id,t.region_id FROM dns.tid365 as ti inner join topology as t on ti.tid=t.id inner join cidr as c on t.region_id=c.region_id order by t.weight asc
  2.     -> ;
  3. Query OK, 182789 rows affected (10.19 sec)
  4. Records: 182789 Duplicates: 0 Warnings: 0

  5. --innodb
  6. mysql> INSERT INTO dns.domain_tmp(begin_ip,end_ip,pool_id,region_id) SELECT distinct c.begin_ip,c.end_ip,t.pool_id,t.region_id FROM dns.tid364 as ti inner join topology as t on ti.tid=t.id inner join cidr as c on t.region_id=c.region_id order by t.weight desc;
  7. Query OK, 182789 rows affected (9.02 sec)
  8. Records: 182789 Duplicates: 0 Warnings: 0

  9. mysql> call deal_domain();Query OK, 0 rows affected (7.89 sec)


  10. --myisam
  11. mysql> INSERT INTO dns.domain_tmp(begin_ip,end_ip,pool_id,region_id) SELECT distinct c.begin_ip,c.end_ip,t.pool_id,t.region_id FROM dns.tid364 as ti inner join topology as t on ti.tid=t.id inner join cidr as c on t.region_id=c.region_id order by t.weight desc;
  12. Query OK, 182789 rows affected (2.71 sec)
  13. Records: 182789 Duplicates: 0 Warnings: 0

  14. mysql> call deal_domain();
  15. Query OK, 0 rows affected (8.60 sec)


  16. --innodb
  17. mysql> INSERT INTO dns.domain_tmp(begin_ip,end_ip,pool_id,region_id) SELECT distinct c.begin_ip,c.end_ip,t.pool_id,t.region_id FROM dns.tid364 as ti inner join topology as t on ti.tid=t.id inner join cidr as c on t.region_id=c.region_id order by t.weight desc;
  18. Query OK, 182789 rows affected (10.46 sec)
  19. Records: 182789 Duplicates: 0 Warnings: 0

  20. mysql> call deal_domain();Query OK, 0 rows affected (6.70 sec)

 

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