問題 大量のテスト用データのあるテスト環境を作りたいんだけど、大量のデータを作るのって大変ですか? 答え 100万件レベルのデータのテストデータをさくっと作成する方法。 MySQLの場合。 primary key が AUTO_INCREMENT なら # テーブル作る create table a (id int primary key auto_increment, xxx varchar(10)); # 1レコード作る insert into a () values (); # 倍々する insert into a (id) select 0 from a; -- 2行になる insert into a (id) select 0 from a; -- 4行になる insert into a (id) select 0 from a; -- 8行になる insert into a (