Created
July 9, 2025 08:56
-
-
Save Rankarusu/b3876829adb625344949e17ea1ad05f6 to your computer and use it in GitHub Desktop.
Generate lots of data in MySQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drop procedure if exists doWhile; | |
SET autocommit=0; | |
SET unique_checks=0; | |
SET foreign_key_checks=0; | |
DELIMITER // | |
CREATE PROCEDURE doWhile() | |
BEGIN | |
DECLARE i INT default 1; | |
WHILE (i <= 15000000) DO | |
INSERT INTO table VALUES (...); | |
SET i = i+1; | |
END WHILE; | |
END; | |
// | |
CALL doWhile(); | |
SET autocommit=1; | |
SET unique_checks=1; | |
SET foreign_key_checks=1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment