In a part of a controller, I query in an heavy manner my db.
I'm wondering if to use the ActiveRecord::Base.connection.execute(complex query), or if to use a combination of finder. In order to find out the better way, I would like to submit some performance test on the application. I find an easy way to make such tests, the problem is that the instruction on this link: "*http://guides.rubyonrails.org/performance_testing.html*"; doesn't work on Rails 3, it reports me this error:... 'run': uninitialized constant BrowsingTest:STARTED (NameError).
Can someone give me开发者_JS百科 some tips ?tnxPlease note down steps you took to arrive at the error. It would help. Here's a general answer:
Initially, make sure that performance is your actual problem. If it actually is...
Here's an interesting starting point. I like the bit on using message-passing for synchronization, Erlang. Indexes can be handy too.
精彩评论