Ruby on Rails, Activerecord, MySQL, Database.
count if the relation has not been loaded. From the ActiveRecord source code: # File activerecord/lib/active_record/relation.rb, line 210 def size loaded? ? @records.length : count(:all) end Bulk Delete With `delete_all` When destroying a large number of records that do not require Active Record