This project is archived and is in readonly mode.
Extreme performance problem with ActiveRecord queries with date ranges in Ruby 1.8
-
Rolf Timmermans
And just to illustrate how extreme "extreme" is, I have conducted the following benchmark with a simple model named Account with a default created_at column:
require "benchmark" Benchmark.bm do |bm| bm.report { Account.where(:created_at => 2.months.ago..1.month.ago) } endResult for Ruby 1.8 with Rails 3.0.3:
user system total real 175.780000 1.490000 177.270000 (177.330136)Result for Ruby 1.8 with Rails 3.0.3 and the patch I linked to above:
user system total real 0.010000 0.010000 0.020000 ( 0.031937) -
Rolf Timmermans
- Tag changed from arel rails3 performance regression to arel, performance, rails3, regression
-
Aaron Patterson
- State changed from new to committed
- Importance changed from to Low
Thanks. I've merged your changes, and I'll release a new version.
-
Magnus Bergmark
How could this be "Low" priority?