Reputation: 16574
I'm running a lot of ActiveRecord queries in my Rails app that have quite a few named and dynamic scopes. I was wondering if there is any difference performance-wise in how those scopes are order.
For example, could Person.american.adult.find(:all)
be an slower than Person.adult.american.find(:all)
?
Upvotes: 0
Views: 87
Reputation: 1680
Nope. Have a look at your log, and you'll see that ActiveRecord is working its magic by combining them all and then (if possible) performing a single query.
Upvotes: 1