...

/

Optimize Associations With Embedded Schemas

Optimize Associations With Embedded Schemas

Learn how to optimize associations.

Disadvantages of associations

The solution to N+1 queries helps us with situations where our code makes vast numbers of queries that appear to be a simple operations. Even then, fetching associated records always requires an extra round-trip to the database, and there may be situations where we want to avoid it. We might be working with associated records that always ...