Skip to content

Commit 0ffdf6d

Browse files
authored
Merge pull request rails#42615 from zzak/zzak/42572
Add CHANGELOG for rails#42572
2 parents e52048f + 6caaec7 commit 0ffdf6d

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
@@ -494,6 +494,19 @@
494494
end
495495
```
496496
497+
Active Record logs will also include timing info for the duration of how long
498+
the main thread had to wait to access the result. This timing is useful to know
499+
whether or not it's worth to load the query asynchronously.
500+
501+
```
502+
DEBUG -- : Category Load (62.1ms) SELECT * FROM `categories` LIMIT 50
503+
DEBUG -- : ASYNC Post Load (64ms) (db time 126.1ms) SELECT * FROM `posts` LIMIT 100
504+
```
505+
506+
The duration in the first set of parens is how long the main thread was blocked
507+
waiting for the results, and the second set of parens with "db time" is how long
508+
the entire query took to execute.
509+
497510
*Jean Boussier*
498511

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

0 commit comments

Comments
 (0)