for i in `seq 500000`;do trap "break" INT;echo "insert into t5 (id,name,remark)  values ($i,'clouddb38uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu','test good')" > insert.sql;mysql -h172.22.2.180 -P9000 -uroot  < insert.sql ;done

 

 

[root@linux-oracle-zs-cdb01 kkk]# cat ins.sh 


for i in `seq 5000000`; do mysql kkk < insert.sql ;done

[root@linux-oracle-zs-cdb01 kkk]# cat insert.sql 

insert into kkk.k (age,name) values(23,'Jaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaack');

[root@linux-oracle-zs-cdb01 kkk]# cat cha.sql

select * from f where age=23 order by rand() limit 10;



while true;do mysql -e "select *  from kkk.k order by bianhao desc limit 10";sleep 2;done


CREATE DATABASE kkk;

use kkk;

CREATE TABLE `k` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `age` int(11) DEFAULT NULL,
  `name` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;



date;time ./ins.sh ;date
Tue Jul 23 20:22:57 CST 2013

real 624m21.044s
user 103m13.654s
sys 477m38.381s
Wed Jul 24 06:47:18 CST 2013

seq 3000000


select * from k2 into outfile "/data/back/k2bak.txt" fields terminated by ",";

load data infile '/tmp/t1w.txt' into table t1k;


ERROR 2003 (HY000): Can't connect to MySQL server on '172.22.2.180' (99)
ERROR 2003 (HY000): Can't connect to MySQL server on '172.22.2.180' (99)
ERROR 2003 (HY000): Can't connect to MySQL server on '172.22.2.180' (99)
ERROR 2003 (HY000): Can't connect to MySQL server on '172.22.2.180' (99)
ERROR 2003 (HY000): Can't connect to MySQL server on '172.22.2.180' (99)
ERROR 2003 (HY000): Can't connect to MySQL server on '172.22.2.180' (99)
ERROR 2003 (HY000): Can't connect to MySQL server on '172.22.2.180' (99)
ERROR 2003 (HY000): Can't connect to MySQL server on '172.22.2.180' (99)
ERROR 2003 (HY000): Can't connect to MySQL server on '172.22.2.180' (99)
ERROR 2003 (HY000): Can't connect to MySQL server on '172.22.2.180' (99)
ERROR 2003 (HY000): Can't connect to MySQL server on '172.22.2.180' (99)
ERROR 2003 (HY000): Can't connect to MySQL server on '172.22.2.180' (99)
ERROR 2003 (HY000): Can't connect to MySQL server on '172.22.2.180' (99)
ERROR 2003 (HY000): Can't connect to MySQL server on '172.22.2.180' (99)
ERROR 2003 (HY000): Can't connect to MySQL server on '172.22.2.180' (99)
ERROR 2003 (HY000): Can't connect to MySQL server on '172.22.2.180' (99)
ERROR 2003 (HY000): Can't connect to MySQL server on '172.22.2.180' (99)
ERROR 2003 (HY000): Can't connect to MySQL server on '172.22.2.180' (99)
ERROR 2003 (HY000): Can't connect to MySQL server on '172.22.2.180' (99)



DB测试用例

select count(*) from t9k;

+----------+

| count(*) |

+----------+

| 90000000 |

+----------+

未index列

 select * from t9k where id=40004;

+-------+----------+---------+

| id    | name     | bianhao |

+-------+----------+---------+

| 40004 | Jaaaaaaa |   40004 |

+-------+----------+---------+

1 row in set (17.34 sec)


已索引列

select * from t9k where bianhao=40004;

+-------+----------+---------+

| id    | name     | bianhao |

+-------+----------+---------+

| 40004 | Jaaaaaaa |   40004 |

+-------+----------+---------+

1 row in set (0.00 sec)


update对未索引和索引后的测试


mysql> update t9k set name='jjjj' where id=40004;

Query OK, 1 row affected (1 min 40.12 sec)

Rows matched: 1  Changed: 1  Warnings: 0


mysql> update t9k set name='bbbb' where bianhao=40004;

Query OK, 1 row affected (0.00 sec)

Rows matched: 1  Changed: 1  Warnings: 0

 

update t9k set name='Rose' where name='Jaaaaaaa';

Query OK, 9453445 rows affected (15 min 23.70 sec)

Rows matched: 9453445  Changed: 9453445  Warnings: 0

 

alter table u1 modify bianhao int auto_increment primary key;


change master to master_host='172.22.2.180',master_user='admin',master_password='123456',master_log_file='mysql-bin.000022',master_log_pos=1055361606;

 

tcpdump -l -i em1 -w - src or dst port 3306 | strings