MySQL构造测试数据

构造测试数据(笛卡尔积,6 次100 万)

create table t1(id int, val varchar(80));

set @i := 0;
create table tmp as select (@i := @i + 1) as id from information_schema.tables limit 10;

set @i := 0;
insert into t1 select @i := @i + 1, substr(concat(sha1(rand()), sha1(rand())), 1, floor(rand() * 80)) from tmp a, tmp b, tmp c, tmp d, tmp e, tmp f;

posted @ 2017-05-23 17:07  __Yoon  阅读(262)  评论(0编辑  收藏  举报