Changes between Version 1 and Version 2 of CookBookPreloadRelated


Ignore:
Timestamp:
04/05/2006 03:36:38 PM (9 years ago)
Author:
akaihola
Comment:

added note about magic-removal

Legend:

Unmodified
Added
Removed
Modified
  • CookBookPreloadRelated

    v1 v2  
    2323{{{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.
    2424
     25The attached file contains an implementation of {{{preload_related()}}} for the magic-removal branch.
     26
    2527-- ''akaihola'' 2006-04-05
Back to Top