This is my loop by the way: #initialization stuff here count = 0 for k,u in user_root['userdb'].items(): ui=User(userid=u.userid.values()[0]) if 'delicious' in u.userid: de.users.append(ui) elif 'digg' in u.userid: di.users.append(ui) count += 1 if count%1000 ==0: session.flush() print "%d flushed!"%count session.close() transaction.savepoint(True)
On Jan 17, 2008 2:32 PM, Flavio Coelho <[EMAIL PROTECTED]> wrote: > > > On Jan 17, 2008 1:31 PM, Lennart Regebro <[EMAIL PROTECTED]> wrote: > > > On Jan 17, 2008 4:07 PM, Flavio Coelho <[EMAIL PROTECTED]> wrote: > > > Am I doing something wrong, or is it impossible to iterate over a ZODB > > > database which is bigger than you memory? > > > > Hmm. Are you sure you aren't modifying the ZODB objects when you do > > this? That would have this effect. > > > No, I am not modifying the objects in any way.... > > Flávio > > > > > > > -- > > Lennart Regebro: Zope and Plone consulting. > > http://www.colliberty.com/ > > +33 661 58 14 64 > > > > > > -- > Flávio Codeço Coelho > ---------------------------------------------------------------- > "My grandfather once told me that there were two kinds of people: those > who do the work and those who take the credit. He told me to try to be in > the first group; there was much less competition." > Indira Gandhi > ==================================== > registered Linux user # 386432 > get counted at http://counter.li.org > ---------------------------------------------------------------- > -- Flávio Codeço Coelho ---------------------------------------------------------------- "My grandfather once told me that there were two kinds of people: those who do the work and those who take the credit. He told me to try to be in the first group; there was much less competition." Indira Gandhi ==================================== registered Linux user # 386432 get counted at http://counter.li.org ----------------------------------------------------------------
_______________________________________________ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev