Created
December 17, 2014 23:05
-
-
Save abhibeckert/f24e301138174483b098 to your computer and use it in GitHub Desktop.
This file contains 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
// as many inserts as possible before 30 second timeout hits | |
// 226,465 inserts | |
// auto_increment int(11) | |
while (1) { | |
$uuidstr = gen_uuid(); | |
$uuidbin = DB::escape(pack("h*", str_replace('-', '', $uuidstr))); | |
DB::query("insert into test values ()"); | |
} | |
// 266,992 inserts | |
// binary(16) | |
while (1) { | |
$uuidstr = gen_uuid(); | |
$uuidbin = DB::escape(pack("h*", str_replace('-', '', $uuidstr))); | |
DB::query("insert into test set id = '$uuidbin'"); | |
} | |
// 267,644 inserts | |
// binary(36) | |
while (1) { | |
$uuidstr = gen_uuid(); | |
$uuidbin = DB::escape(pack("h*", str_replace('-', '', $uuidstr))); | |
DB::query("insert into test set id = '$uuidstr '"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment