Skip to content

Commit 6caaec7

Browse files
committed
Add CHANGELOG for rails#42572
1 parent 3a2205c commit 6caaec7

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

activerecord/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,19 @@
469469
end
470470
```
471471
472+
Active Record logs will also include timing info for the duration of how long
473+
the main thread had to wait to access the result. This timing is useful to know
474+
whether or not it's worth to load the query asynchronously.
475+
476+
```
477+
DEBUG -- : Category Load (62.1ms) SELECT * FROM `categories` LIMIT 50
478+
DEBUG -- : ASYNC Post Load (64ms) (db time 126.1ms) SELECT * FROM `posts` LIMIT 100
479+
```
480+
481+
The duration in the first set of parens is how long the main thread was blocked
482+
waiting for the results, and the second set of parens with "db time" is how long
483+
the entire query took to execute.
484+
472485
*Jean Boussier*
473486

474487
* Implemented `ActiveRecord::Relation#excluding` method.

0 commit comments

Comments
 (0)