rails/rails — Issue #3347: Rails 3.1 ActiveRecord performance regression
Author: sradu
Created: 2011-10-16 21:48:03+00:00
State: open

Hi.

I've ported a project to rails 3.1.1, and pushed it online after everything seemed OK. The 3.1 version overloaded the server and crashed it after 10 or so minutes.

While debugging I've noticed that even a simple query like "Affrequest.where('campaign_id in (?)', Campaign.all).all" takes 200ms on rails 3.0 and 1200ms on rails 3.1. I thought it might be the mysql2 gem, so I tried with the mysql gem and that gave me 3000ms on rails 3.0 and 7000ms on rails 3.1.

I've attached two perftools reports:
rails 3.0 http://i.imgur.com/tJGW3.gif
rails 3.1 http://i.imgur.com/87zYl.gif

If there's any other information I can provide let me know.