Skip to content

Commit e7f91d5

Browse files
committed
Use proper heading for "N + 1 queries" section [ci-skip]
Instead of using a bold pseudo heading, use a real heading.
1 parent f7a4022 commit e7f91d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

guides/source/active_record_querying.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,7 +1493,7 @@ Eager Loading Associations
14931493

14941494
Eager loading is the mechanism for loading the associated records of the objects returned by `Model.find` using as few queries as possible.
14951495

1496-
**N + 1 queries problem**
1496+
### N + 1 Queries Problem
14971497

14981498
Consider the following code, which finds 10 books and prints their authors' last_name:
14991499

@@ -1507,7 +1507,7 @@ end
15071507

15081508
This code looks fine at the first sight. But the problem lies within the total number of queries executed. The above code executes 1 (to find 10 books) + 10 (one per each book to load the author) = **11** queries in total.
15091509

1510-
**Solution to N + 1 queries problem**
1510+
#### Solution to N + 1 Queries Problem
15111511

15121512
Active Record lets you specify in advance all the associations that are going to be loaded.
15131513

0 commit comments

Comments
 (0)