On Sat, Dec 11, 2010 at 10:43 PM, Christophe Pettus <[email protected]>wrote:
> Hi, > > I've been spelunking through the 1.2.3 Model code, and wanted to see if > someone more familiar with that code than I could answer a question. > > In the case of returning the results of a query set, it appears that for > most back ends Django reads the results from the cursor in units of > GET_ITERATOR_CHUNK_SIZE (which is hard coded right now to be 100). So, in > the case of using .iterator() (no caching of results), it shouldn't have > more than 100 result objects in memory at once, unless the client of the > query set is saving them. Am I reading it correctly? > > -- > -- Christophe Pettus > [email protected] > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<django-developers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/django-developers?hl=en. > > Yes, if you're using iterator you'll have Django storing 100 items at a time. That being said I believe I read that some of the database wrappers do their own caching (it's either mysqldb or psycopg2, I dont' remember which). Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero "Code can always be simpler than you think, but never as simple as you want" -- Me -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
