Created
October 2, 2015 00:25
-
-
Save doofusdavid/1f7ef20be09f599b19a9 to your computer and use it in GitHub Desktop.
stored procedure to create a bunch of ratings
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
| DELIMITER $$ | |
| CREATE DEFINER=`root`@`%` PROCEDURE `new_procedure`() | |
| BEGIN | |
| DECLARE counter int; | |
| set counter = 0; | |
| while counter < 1000000 do | |
| insert into Rating (Rating, MovieID) VALUES (truncate(rand()*10, 0), 1); | |
| set counter=counter+1; | |
| end while; | |
| -- Runs in 418 seconds | |
| END$$ | |
| DELIMITER ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment