| Web Development >> Ruby On Rails |
Eager Loading
| Language : | English | Quality : | High | Has Audio : | true | Source : | Other | Media : | QuickTime |
| One way to improve performance is to cut down on the number of SQL queries. You can do this through eager loading. Learn all about it in this episode! |
Tags: Ruby On Rails, Ruby, Web Development, Performance, Screencast, [SUGGEST A TAG]
Resources referenced in this screencast
|
Articles Realted to this Topic |
[SUGGEST A ARTICLE] |
|
Eager loading with cascaded associations I created a patch that removes limitations for depth of joining tables when we use eager loading. Now we can cascade associations as much as we want! |
|
Eager loading objects in a Rails has_many :through association As with standard joins, you can use the find method’s :include option to include associated objects within the query. But I wasn’t having much luck pulling in both the runs and the venues: the runs would be detected, but iterating through the productions would trigger a fresh SQL query to find the relevant venue information. |
