Skip to content

Instantly share code, notes, and snippets.

@muddydixon
Created June 25, 2013 02:39
Show Gist options
  • Save muddydixon/5855486 to your computer and use it in GitHub Desktop.
Save muddydixon/5855486 to your computer and use it in GitHub Desktop.
INSERT INTO hoge (num) VALUES (0.156385139170201),(0.223289187855215),(0.474215383446914),(0.577255681247102),(0.188064718514472),(0.520055067710913),(0.879612448063508),(0.118504724273485),(0.266510761334221),(0.888896261866421);
CREATE TABLE hoge (num FLOAT);
INSERT INTO hoge (num) VALUES (0.693200292605074);
INSERT INTO hoge (num) VALUES (0.273215001306625);
INSERT INTO hoge (num) VALUES (0.629568037382466);
INSERT INTO hoge (num) VALUES (0.813142279252993);
INSERT INTO hoge (num) VALUES (0.214606206759601);
INSERT INTO hoge (num) VALUES (0.435182503410019);
INSERT INTO hoge (num) VALUES (0.843147371333853);
INSERT INTO hoge (num) VALUES (0.0542146123890106);
INSERT INTO hoge (num) VALUES (0.286300026802937);
INSERT INTO hoge (num) VALUES (0.270591839741201);
START TRANSACTION;
INSERT INTO hoge (num) VALUES (0.693200292605074);
INSERT INTO hoge (num) VALUES (0.273215001306625);
INSERT INTO hoge (num) VALUES (0.629568037382466);
INSERT INTO hoge (num) VALUES (0.813142279252993);
INSERT INTO hoge (num) VALUES (0.214606206759601);
INSERT INTO hoge (num) VALUES (0.435182503410019);
INSERT INTO hoge (num) VALUES (0.843147371333853);
INSERT INTO hoge (num) VALUES (0.0542146123890106);
INSERT INTO hoge (num) VALUES (0.286300026802937);
INSERT INTO hoge (num) VALUES (0.270591839741201);
COMMIT;
% time mysql test < bulk.sql
0.01s user 0.00s system 6% cpu 0.162 total
% time mysql test < each.sql
0.14s user 0.20s system 3% cpu 8.792 total
% time mysql test < each_with_tx.sql
0.11s user 0.16s system 25% cpu 1.062 total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment