PHP PDO Statement INSERT Performance Comparison

1 - 100 Statements Separately: Statement is prepared once and then execute() 100 times.
2 - 100 Statements in 1 Transaction: Statement is prepared once, and then execute() 100 times wrapped in one transaction between PDO::beginTransaction() and PDO::commit()
3 - 1 Batch INSERT: Raw MySQL batch INSERT query executed once, e.g. INSERT INTO `t1` (`f1`, `f2`, `f3`) VALUES (1, 2, 3), (4, 5, 6), (7, 8, 9), ... (100, 101, 102)

Time is in seconds.

------ i5, 4G, SSD, WAMP w/ PHP5.4 & MySQL 5.5

===
100 Statements Separately: 0.67051792144775
100 Statements in 1 Transaction: 0.055913925170898
1 Batch INSERT: 0.086097002029419

===
100 Statements Separately: 0.55154204368591
100 Statements in 1 Transaction: 0.034979104995728
1 Batch INSERT: 0.082490921020508

===
100 Statements Separately: 0.67479991912842
100 Statements in 1 Transaction: 0.059589147567749
1 Batch INSERT: 0.083395957946777

===
100 Statements Separately: 0.61414885520935
100 Statements in 1 Transaction: 0.052032947540283
1 Batch INSERT: 0.10248899459839

===
100 Statements Separately: 0.57872796058655
100 Statements in 1 Transaction: 0.036602973937988
1 Batch INSERT: 0.083294868469238

===
100 Statements Separately: 0.66222381591797
100 Statements in 1 Transaction: 0.038510084152222
1 Batch INSERT: 0.09791088104248

===
1000 Statements Separately: 6.69349193573
1000 Statements in 1 Transaction: 0.28565287590027
1 Batch INSERT: 0.15678191184998

===
1000 Statements Separately: 6.3088519573212
1000 Statements in 1 Transaction: 0.30563688278198
1 Batch INSERT: 0.15439605712891

===
500 Statements Separately: 3.1908769607544
500 Statements in 1 Transaction: 0.21274900436401
1 Batch INSERT: 0.11846399307251

===
500 Statements Separately: 3.1831800937653
500 Statements in 1 Transaction: 0.15132308006287
1 Batch INSERT: 0.1353600025177

===
500 Statements Separately: 3.1901650428772
500 Statements in 1 Transaction: 0.15579986572266
1 Batch INSERT: 0.10645890235901

===
500 Statements Separately: 3.2249419689178
500 Statements in 1 Transaction: 0.13569092750549
1 Batch INSERT: 0.11480498313904

===
500 Statements Separately: 3.1544909477234
500 Statements in 1 Transaction: 0.17289590835571
1 Batch INSERT: 0.13074398040771

===
500 Statements Separately: 3.2808699607849
500 Statements in 1 Transaction: 0.21295785903931
1 Batch INSERT: 0.14598202705383

===
500 Statements Separately: 3.2498738765717
500 Statements in 1 Transaction: 0.18215394020081
1 Batch INSERT: 0.11349511146545

===
500 Statements Separately: 3.2588129043579
500 Statements in 1 Transaction: 0.15578007698059
1 Batch INSERT: 0.11585593223572

===
200 Statements Separately: 1.2803390026093
200 Statements in 1 Transaction: 0.12608599662781
1 Batch INSERT: 0.12259912490845

===
200 Statements Separately: 1.2098431587219
200 Statements in 1 Transaction: 0.12714791297913
1 Batch INSERT: 0.1076819896698

===
200 Statements Separately: 1.2965180873871
200 Statements in 1 Transaction: 0.10453701019287
1 Batch INSERT: 0.10310292243958

===
200 Statements Separately: 1.341285943985
200 Statements in 1 Transaction: 0.15853404998779
1 Batch INSERT: 0.13593292236328

===
200 Statements Separately: 1.4480469226837
200 Statements in 1 Transaction: 0.078447103500366
1 Batch INSERT: 0.14049005508423

===
200 Statements Separately: 1.1464989185333
200 Statements in 1 Transaction: 0.10341095924377
1 Batch INSERT: 0.096709012985229

===
200 Statements Separately: 1.2890269756317
200 Statements in 1 Transaction: 0.13225507736206
1 Batch INSERT: 0.10499715805054

===
200 Statements Separately: 1.2543721199036
200 Statements in 1 Transaction: 0.067960023880005
1 Batch INSERT: 0.09285306930542

===
200 Statements Separately: 1.2369658946991
200 Statements in 1 Transaction: 0.063730955123901
1 Batch INSERT: 0.092394828796387

===
200 Statements Separately: 1.228499174118
200 Statements in 1 Transaction: 0.063158988952637
1 Batch INSERT: 0.077562093734741

===
200 Statements Separately: 1.2652449607849
200 Statements in 1 Transaction: 0.091588973999023
1 Batch INSERT: 0.10183501243591

===
200 Statements Separately: 1.2521781921387
200 Statements in 1 Transaction: 0.089071989059448
1 Batch INSERT: 0.12961792945862

===
200 Statements Separately: 1.2948999404907
200 Statements in 1 Transaction: 0.081485986709595
1 Batch INSERT: 0.097064018249512

===
200 Statements Separately: 1.3661279678345
200 Statements in 1 Transaction: 0.051222085952759
1 Batch INSERT: 0.086040019989014

===
200 Statements Separately: 1.2234358787537
200 Statements in 1 Transaction: 0.095308065414429
1 Batch INSERT: 0.097282886505127

===
200 Statements Separately: 1.3032321929932
200 Statements in 1 Transaction: 0.051568031311035
1 Batch INSERT: 0.096372842788696

===
200 Statements Separately: 1.3457109928131
200 Statements in 1 Transaction: 0.096780061721802
1 Batch INSERT: 0.085524082183838

===
200 Statements Separately: 1.2250368595123
200 Statements in 1 Transaction: 0.068557024002075
1 Batch INSERT: 0.099449157714844

===
200 Statements Separately: 1.3400611877441
200 Statements in 1 Transaction: 0.081252098083496
1 Batch INSERT: 0.088041067123413

===
200 Statements Separately: 1.3630549907684
200 Statements in 1 Transaction: 0.09298300743103
1 Batch INSERT: 0.095729827880859

===
100 Statements Separately: 0.66995596885681
100 Statements in 1 Transaction: 0.054182052612305
1 Batch INSERT: 0.10504698753357

===
100 Statements Separately: 0.6165030002594
100 Statements in 1 Transaction: 0.058448076248169
1 Batch INSERT: 0.080709934234619

===
100 Statements Separately: 0.73769903182983
100 Statements in 1 Transaction: 0.037227869033813
1 Batch INSERT: 0.074483156204224

===
100 Statements Separately: 0.57956790924072
100 Statements in 1 Transaction: 0.026843070983887
1 Batch INSERT: 0.087028026580811

===
100 Statements Separately: 0.62894582748413
100 Statements in 1 Transaction: 0.053706884384155
1 Batch INSERT: 0.090391159057617

===
100 Statements Separately: 0.62777996063232
100 Statements in 1 Transaction: 0.049778938293457
1 Batch INSERT: 0.090245962142944

===
100 Statements Separately: 0.64530301094055
100 Statements in 1 Transaction: 0.068266153335571
1 Batch INSERT: 0.096045970916748

===
50 Statements Separately: 0.31237292289734
50 Statements in 1 Transaction: 0.023385047912598
1 Batch INSERT: 0.08083701133728

===
50 Statements Separately: 0.33733296394348
50 Statements in 1 Transaction: 0.018777132034302
1 Batch INSERT: 0.080335855484009

===
50 Statements Separately: 0.29767203330994
50 Statements in 1 Transaction: 0.020711183547974
1 Batch INSERT: 0.078687906265259

===
50 Statements Separately: 0.26959013938904
50 Statements in 1 Transaction: 0.019950151443481
1 Batch INSERT: 0.080159902572632

===
1000 Statements Separately: 6.128466129303
1000 Statements in 1 Transaction: 0.24956107139587
1 Batch INSERT: 0.11138200759888

===
1000 Statements Separately: 6.4098968505859
1000 Statements in 1 Transaction: 0.22810792922974
1 Batch INSERT: 0.10828804969788

===
1000 Statements Separately: 6.1551921367645
1000 Statements in 1 Transaction: 0.21147894859314
1 Batch INSERT: 0.11377191543579

===
1000 Statements Separately: 6.4115309715271
1000 Statements in 1 Transaction: 0.24873018264771
1 Batch INSERT: 0.13820195198059

===
1000 Statements Separately: 6.5052440166473
1000 Statements in 1 Transaction: 0.28149700164795
1 Batch INSERT: 0.11497092247009

===
10000 Statements Separately: 63.50478887558
10000 Statements in 1 Transaction: 2.1341099739075
1 Batch INSERT: 0.51968002319336

===
10000 Statements Separately: 63.842128038406
10000 Statements in 1 Transaction: 1.8930599689484
1 Batch INSERT: 0.74937987327576