mysql中迅速插入百万条测试数据的方法

BEGIN
    #Routine body goes here...
    declare i decimal (10) default 0 ;
    dd:loop
    INSERT INTO `table` ( `title`, `status`, `inputtime`, `content`) VALUES ('1', '1', '1', '1');
    commit;
    set i = i+1;
    if i= 1000000 then leave dd;
    end if;
    end loop dd ; 
END
相关文章
相关标签/搜索