On Oct 28, 6:39 am, Shimon <[email protected]> wrote: > I was trying to work out why a page on my site was so slow. The > queries themselves seemed to be executing pretty quickly so I tried > playing around to see if Rails was causing the overhead. > > I changed the line: > records = Record.order(:col).joins(:table1) > to: > records = Record.order(:col).joins('INNER JOIN "table1" ON > "table1"."table2_id" = "table2"."id"') > > ...and this shaved 100s of ms off the page render time. > > Can anyone else try this and confirm it? >
There are some performance issues with arel (Active Relations) 1.0.x (which is used by Rails 3.0.1). The 2.0.1 version is supposed to fix these issues. I believe that the next version of Rails 3 will use arel 2.0.x. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

