从上面的语句看来mysiam的插入要比innodb快很多,但是innodb的删除却比myisam块
- 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
- -> ;
- Query OK, 182789 rows affected (10.19 sec)
- Records: 182789 Duplicates: 0 Warnings: 0
- --innodb
- 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;
- Query OK, 182789 rows affected (9.02 sec)
- Records: 182789 Duplicates: 0 Warnings: 0
- mysql> call deal_domain();Query OK, 0 rows affected (7.89 sec)
- --myisam
- 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;
- Query OK, 182789 rows affected (2.71 sec)
- Records: 182789 Duplicates: 0 Warnings: 0
- mysql> call deal_domain();
- Query OK, 0 rows affected (8.60 sec)
- --innodb
- 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;
- Query OK, 182789 rows affected (10.46 sec)
- Records: 182789 Duplicates: 0 Warnings: 0
- mysql> call deal_domain();Query OK, 0 rows affected (6.70 sec)
阅读(2318) | 评论(0) | 转发(0) |