表段和字段要求不限、、里面包含几十万到几千万条记录都行、
就是需要一个测试库、、测试下性能、、
所以内容需要有重复,但是也别全重复啊、
你们也可以写个脚本循环生成一个、、字段数在6-10个左右最好、
谢谢大家了

解决方案 »

  1.   


    use mysql;drop database test;create database test character set = 'gbk';use test;create table if not exists t1 (
    c1 int auto_increment not null primary key,
    c2 float not null default 0.0,
    c3 char(50) not null default '',
    c4 varchar(50) not null default '',
    c5 datetime not null default '1900-01-01 00:00:00',
    c6 timestamp not null default current_timestamp
    );
    drop procedure if exists create_sample;delimiter //
    create procedure  create_sample (in v_count bigint)
    begin
    declare v_i bigint;
    set v_i=1;

    while (v_i<=v_count)
    do
    insert into test.t1 select null,rand()*10000,uuid(),uuid(),adddate(now(),interval rand()*50000 second),sysdate();
    set v_i=v_i+1;
    end while;
    end //delimiter ;call create_sample(100);
      

  2.   

    不好意思. call create_sample(60000000);