1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #42615 from zzak/zzak/42572

Add CHANGELOG for #42572
This commit is contained in:
Zachary Scott 2021-06-28 19:54:52 +09:00 committed by GitHub
commit 0ffdf6dfe7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -494,6 +494,19 @@
end
```
Active Record logs will also include timing info for the duration of how long
the main thread had to wait to access the result. This timing is useful to know
whether or not it's worth to load the query asynchronously.
```
DEBUG -- : Category Load (62.1ms) SELECT * FROM `categories` LIMIT 50
DEBUG -- : ASYNC Post Load (64ms) (db time 126.1ms) SELECT * FROM `posts` LIMIT 100
```
The duration in the first set of parens is how long the main thread was blocked
waiting for the results, and the second set of parens with "db time" is how long
the entire query took to execute.
*Jean Boussier*
* Implemented `ActiveRecord::Relation#excluding` method.