Skip to content

Instantly share code, notes, and snippets.

@melnikaite
Created September 29, 2016 07:12
Show Gist options
  • Save melnikaite/5cb0638255b3db02c3109391cb156df0 to your computer and use it in GitHub Desktop.
Save melnikaite/5cb0638255b3db02c3109391cb156df0 to your computer and use it in GitHub Desktop.
Benchmark activerecord-mysql activerecord-postgresql activerecord-sqlite mongoid-mongodb sequel-mysql sequel-postgresql sequel-sqlite
Eager Loading Query Per Association With 1-1 Records: 640 objects 22 times-No Transaction 5.921149 6.284935 5.860397 1.314835 0.254055 0.283381 0.356529
Eager Loading Query Per Association With 1-1 Records: 640 objects 22 times-Transaction 6.012105 6.493957 5.738628 0.253842 0.282353 0.376487
Eager Loading Query Per Association With 1-32 Records: 1024 objects 22 times-No Transaction 1.087165 1.114392 1.037673 0.908334 0.190097 0.206294 0.273892
Eager Loading Query Per Association With 1-32 Records: 1024 objects 22 times-Transaction 1.085952 1.150046 1.015849 0.191712 0.212131 0.271282
Eager Loading Query Per Association With 1-32-32 Records: 2048 objects 9 times-No Transaction 0.848494 0.894651 0.810860 0.082494 0.168703 0.170906 0.239950
Eager Loading Query Per Association With 1-32-32 Records: 2048 objects 9 times-Transaction 0.835610 0.867175 0.787067 0.168840 0.171462 0.242453
Eager Loading Single Query With 1-1 Records: 640 objects 22 times-No Transaction 6.124076 6.288630 5.828340 1.340096 0.322010 0.337945 0.367021
Eager Loading Single Query With 1-1 Records: 640 objects 22 times-Transaction 6.086840 6.207720 5.849614 0.323998 0.337548 0.350227
Eager Loading Single Query With 1-32 Records: 1024 objects 22 times-No Transaction 1.364803 1.503989 1.355549 0.872595 0.323903 0.381155 0.419204
Eager Loading Single Query With 1-32 Records: 1024 objects 22 times-Transaction 1.378595 1.536316 1.381781 0.323602 0.381177 0.415349
Eager Loading Single Query With 1-32-32 Records: 2048 objects 1 time-No Transaction 0.862394 0.946798 0.651524 0.048371 0.495893 0.628606 0.752349
Eager Loading Single Query With 1-32-32 Records: 2048 objects 1 time-Transaction 0.898574 0.930522 0.639043 0.514716 0.621596 0.730708
Heavy Threading with 32 threads-No Transaction 4.094384 3.869678 5.965839 3.650763 2.727126 2.294078 3.991929
Lazy Loading With 1-1 Records: 640 objects 1 time-No Transaction 0.827227 0.694406 0.493390 0.694354 0.185087 0.230918 0.136217
Lazy Loading With 1-1 Records: 640 objects 1 time-Transaction 0.782228 0.734829 0.480194 0.182343 0.245873 0.134039
Lazy Loading With 1-32 Records: 1024 objects 16 times-No Transaction 1.222054 1.096866 0.838761 1.187451 0.299161 0.391045 0.324995
Lazy Loading With 1-32 Records: 1024 objects 16 times-Transaction 1.114675 1.016827 0.838474 0.298749 0.408294 0.350206
Light Threading with 6 threads-No Transaction 0.807636 0.744978 1.153727 1.179487 0.463763 0.485178 0.730275
Model Object And Associated Object Creation: 640 objects-No Transaction 1.415905 1.536172 2.470301 1.704386 1.337023 0.887568 1.906659
Model Object And Associated Object Creation: 640 objects-Transaction 0.942093 1.007788 0.681037 0.770778 0.331953 0.327160
Model Object Creation: 1600 objects-No Transaction 1.726206 1.819698 2.671872 1.767134 1.733902 0.859338 2.325733
Model Object Creation: 1600 objects-Transaction 0.942817 1.022404 0.757487 0.778894 0.326151 0.341968
Model Object Destruction: 3200 objects-No Transaction 2.777672 2.653206 4.558309 1.309976 1.952090 1.781639 3.564236
Model Object Destruction: 3200 objects-Transaction 1.191994 1.207013 1.542928 0.711172 0.597777 0.272757
Model Object Select Hash Deep: 320 objects 32 times-No Transaction 3.766205 6.228119 2.908135 16.522907 2.311686 2.400492 1.173397
Model Object Select Hash Deep: 320 objects 32 times-Transaction 3.805291 6.160995 2.874458 2.254475 2.336168 1.098046
Model Object Select Hash: 320 objects 32 times-No Transaction 2.429281 2.137352 1.357554 7.186774 1.909931 1.815565 0.877862
Model Object Select Hash: 320 objects 32 times-Transaction 2.528207 2.082378 1.230184 1.871180 1.687825 0.819257
Model Object Select PK: 320 objects 32 times-No Transaction 2.529340 2.031882 1.381400 7.933735 2.510121 1.444023 0.826297
Model Object Select PK: 320 objects 32 times-Transaction 2.554623 2.014475 1.169328 2.533939 1.432481 0.751127
Model Object Select and Save: 1600 objects-No Transaction 2.176434 2.136839 3.177714 1.540216 1.206552 0.859722 1.871907
Model Object Select and Save: 1600 objects-Transaction 1.406454 1.366843 1.000696 0.461053 1.200633 0.205999
Model Object Select: 3200 objects 32 times-No Transaction 1.784212 1.343524 1.502328 0.034250 0.473266 1.330872 0.742555
Model Object Select: 3200 objects 32 times-Transaction 1.689446 1.354729 1.348847 0.465895 1.339790 0.753261
Model Object Update Hash Deep: 320 objects 32 times-No Transaction 3.459561 6.687125 12.849716 4.496290 2.050303 4.685564 10.123530
Model Object Update Hash Deep: 320 objects 32 times-Transaction 3.261778 3.875162 2.546304 1.868345 2.010605 0.860815
Model Object Update Hash Full: 320 objects 32 times-No Transaction 20.854847 10.342928 8.519000 4.624574 4.650567 4.758699 10.546059
Model Object Update Hash Full: 320 objects 32 times-Transaction 15.834512 8.964495 6.848342 1.984650 2.264453 0.998227
Model Object and Associated Object Destruction: 800 objects-No Transaction 2.486581 2.647694 3.183668 1.543462 1.270090 1.313615 2.101499
Model Object and Associated Object Destruction: 800 objects-Transaction 1.719304 1.610015 1.175926 0.578863 0.575919 0.297936
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment