ibanez270dx
6/11/2015 - 2:00 AM

SQL vs. ActiveRecord Benchmark (Subscribers)

SQL vs. ActiveRecord Benchmark (Subscribers)

# 100_000 users
# Rehearsal ---------------------------------------------------
# SQL Conditional   3.910000   0.060000   3.970000 (  3.991377)
#  AR Conditional   4.930000   0.050000   4.980000 (  4.971518)
# ------------------------------------------ total: 8.950000sec
# 
#                       user     system      total        real
# SQL Conditional   3.760000   0.030000   3.790000 (  3.800231)
#  AR Conditional   4.910000   0.040000   4.950000 (  4.957218)
# 
# All (2_478_408) users
# Rehearsal ---------------------------------------------------
# SQL Conditional   3.490000   0.030000   3.520000 (  3.522121)
#  AR Conditional   2.160000   0.020000   2.180000 (  2.175041)
# ------------------------------------------ total: 5.700000sec
# 
#                       user     system      total        real
# SQL Conditional   3.550000   0.030000   3.580000 (  3.576787)
#  AR Conditional   2.150000   0.020000   2.170000 (  2.166847)

=> [#<Benchmark::Tms:0x007fd2426b9588
  @cstime=0.0,
  @cutime=0.0,
  @label="SQL Conditional",
  @real=3.576787060999777,
  @stime=0.030000000000000027,
  @total=3.580000000000001,
  @utime=3.5500000000000007>,
 #<Benchmark::Tms:0x007fd24efb65d0
  @cstime=0.0,
  @cutime=0.0,
  @label=" AR Conditional",
  @real=2.1668473320023622,
  @stime=0.020000000000000018,
  @total=2.170000000000002,
  @utime=2.150000000000002>]