| 型号 |
服务器 |
小型机 |
| 命令行 |
时间 |
时间 |
| create table huge(a varchar(32), b decimal(18,2)); |
|
|
| insert into huge values( 'abcdef1234567890abcdef1234567890','99999999.99'); |
|
|
| insert into huge select * from huge;(18次,共524288行,第18次) |
3.34 |
|
| select count(*) from huge; |
0 |
0.02 |
| select sum(b) from huge; |
1.63 |
2.19 |
| create table huge2 select * from huge; |
6.97 |
6.15 |
| update huge2 set b=rand(UNIX_TIMESTAMP() ); |
14.48 |
31.32 |
| select count(*) from huge2 where b<0.5;(索引前) |
1.19 |
2.03 |
| create index huge2_b on huge2(b); |
8.95 |
28.88 |
| select count(*) from huge2 where b<0.5;(索引后) |
0.89 |
2.09 |
| create table opt(id bigint, v decimal(18,2)); |
|
|
| insert into opt (v) select b from huge2; |
4.09 |
4.25 |
| update opt set id=rand(UNIX_TIMESTAMP() )*100000000; |
3.69 |
8.24 |