Changes between Version 1 and Version 2 of CookBookPreloadRelated
- Timestamp:
- Apr 5, 2006, 3:36:38 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CookBookPreloadRelated
v1 v2 23 23 {{{preload_related()}}} will create one SQL query for each related model. This is a huge improvement, since previously every access to, say, {{{user.userproperty_set.all()}}} would run a separate SQL query. In one of my more complex views, this reduced the number of queries from over 6000 to just eight. 24 24 25 The attached file contains an implementation of {{{preload_related()}}} for the magic-removal branch. 26 25 27 -- ''akaihola'' 2006-04-05