Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use 5.010;
- use strict;
- use autodie;
- open(my $fh, '>', 'queries.txt');
- say "Starting!";
- my $count = 0;
- my $min = 56;
- my $max = 1000;
- for my $i ($min .. $max)
- {
- print $fh "INSERT INTO items (id) VALUES ('$i');\n";
- print $fh "DELETE FROM items WHERE id = '$i';" .
- ($i < $max ? "\n" : "");
- ++$count;
- say "Query $count processed.";
- }
- close $fh;
- say "Processed $count queries.";
- say "Done!";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement