mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
preheat the table cache in arel
This commit is contained in:
parent
3755ae04a1
commit
1e9685f159
1 changed files with 1 additions and 0 deletions
|
@ -7,6 +7,7 @@ class EachTest < ActiveRecord::TestCase
|
|||
def setup
|
||||
@posts = Post.order("id asc")
|
||||
@total = Post.count
|
||||
Post.count('id') # preheat arel's table cache
|
||||
end
|
||||
|
||||
def test_each_should_excecute_one_query_per_batch
|
||||
|
|
Loading…
Reference in a new issue