Assuming there are 2 models called User
and Post
Which will be better performance(fast) either "Plan A" or "Plan B"?
"Plan A"
controller
@users = User.find_all_by_country(params[:country])
@posts = Post.find_all_by_category(params[:category])
view
<%= @users.count.to_s %>
<%= @posts.count.to_s %>
"Plan B"
controller
@users = User.find_all_by_country(params[:country])
@posts = Post.find_all_by_category(params[:category])
view
<%= @users.length.to_s %>
<%= @posts.length.to_s %>