|
$ ./benchmark.rb 1000 |
|
user system total real |
|
# Inserting 1000 rows normally |
|
insertion 0.290000 0.030000 0.320000 ( 0.396852) |
|
|
|
# Updating 1000 rows normally |
|
updating 0.280000 0.020000 0.300000 ( 0.381354) |
|
|
|
# Updating 100 rows, adding 10 columns each |
|
insertion/10 0.280000 0.020000 0.300000 ( 0.410743) |
|
|
|
# Updating 100 rows, updating 10 columns each |
|
updating/10 0.270000 0.020000 0.290000 ( 0.378530) |
|
|
|
# Updating 100 rows for comparison - not batched |
|
update/10, not batched 0.030000 0.010000 0.040000 ( 0.034458) |
|
|
|
# Updating 100 rows, batched by row, adding 10 columns each |
|
batch insertion/10 0.110000 0.000000 0.110000 ( 0.141858) |
|
|
|
# Updating 100 rows, batched by row, updating 10 columns each |
|
batch update/10 0.110000 0.000000 0.110000 ( 0.133757) |
|
|
|
###################################################################### |
|
|
|
|
|
$ ./benchmark.rb 5000 |
|
user system total real |
|
# Inserting 5000 rows normally |
|
insertion 1.390000 0.120000 1.510000 ( 1.955963) |
|
|
|
# Updating 5000 rows normally |
|
updating 1.370000 0.110000 1.480000 ( 1.845302) |
|
|
|
# Updating 500 rows, adding 10 columns each |
|
insertion/10 1.370000 0.110000 1.480000 ( 1.826632) |
|
|
|
# Updating 500 rows, updating 10 columns each |
|
updating/10 1.380000 0.110000 1.490000 ( 1.852316) |
|
|
|
# Updating 500 rows for comparison - not batched |
|
update/10, not batched 0.140000 0.020000 0.160000 ( 0.189078) |
|
|
|
# Updating 500 rows, batched by row, adding 10 columns each |
|
batch insertion/10 0.540000 0.010000 0.550000 ( 0.647655) |
|
|
|
# Updating 500 rows, batched by row, updating 10 columns each |
|
batch update/10 0.540000 0.010000 0.550000 ( 0.642064) |
|
|
|
###################################################################### |
|
|
|
$ ./benchmark.rb 10000 |
|
user system total real |
|
# Inserting 10000 rows normally |
|
insertion 2.810000 0.240000 3.050000 ( 3.846309) |
|
|
|
# Updating 10000 rows normally |
|
updating 2.750000 0.230000 2.980000 ( 3.712084) |
|
|
|
# Updating 1000 rows, adding 10 columns each |
|
insertion/10 2.770000 0.220000 2.990000 ( 3.699602) |
|
|
|
# Updating 1000 rows, updating 10 columns each |
|
updating/10 2.760000 0.230000 2.990000 ( 3.715243) |
|
|
|
# Updating 1000 rows for comparison - not batched |
|
update/10, not batched 0.280000 0.020000 0.300000 ( 0.365043) |
|
|
|
# Updating 1000 rows, batched by row, adding 10 columns each |
|
batch insertion/10 1.090000 0.030000 1.120000 ( 1.304325) |
|
|
|
# Updating 1000 rows, batched by row, updating 10 columns each |
|
batch update/10 1.080000 0.030000 1.110000 ( 1.285272) |