This is my loop by the way:<br><br>&nbsp;&nbsp;&nbsp; #initialization stuff here<br>&nbsp;&nbsp;&nbsp; count = 0<br>&nbsp;&nbsp;&nbsp; for k,u in user_root[&#39;userdb&#39;].items():<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ui=User(userid=u.userid.values()[0])<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &#39;delicious&#39; in 
u.userid:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; de.users.append(ui)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elif &#39;digg&#39; in u.userid:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; di.users.append(ui)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; count += 1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if count%1000 ==0:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session.flush()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print &quot;%d flushed!&quot;%count
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session.close()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; transaction.savepoint(True)<br><br><div class="gmail_quote">On Jan 17, 2008 2:32 PM, Flavio Coelho &lt;<a href="mailto:fccoelho@gmail.com">fccoelho@gmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><br><div class="gmail_quote"><div class="Ih2E3d">On Jan 17, 2008 1:31 PM, Lennart Regebro &lt;
<a href="mailto:regebro@gmail.com" target="_blank">regebro@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>On Jan 17, 2008 4:07 PM, Flavio Coelho &lt;<a href="mailto:fccoelho@gmail.com" target="_blank">fccoelho@gmail.com</a>&gt; wrote:<br>&gt; Am I doing something wrong, or is it impossible to iterate over a ZODB<br>&gt; database which is bigger than you memory?
<br><br></div>Hmm. Are you sure you aren&#39;t modifying the ZODB objects when you do<br>this? That would have this effect.</blockquote></div><div><br>No, I am not modifying the objects in any way....<br><br>Flávio<br></div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><font color="#888888"><br>--<div class="Ih2E3d"><br>Lennart Regebro: Zope and Plone consulting.<br><a href="http://www.colliberty.com/" target="_blank">http://www.colliberty.com/</a><br>+33 661 58 14 64<br></div></font>
</blockquote></div><br><br clear="all">
<div><div></div><div class="Wj3C7c"><br>-- <br>Flávio Codeço Coelho<br>----------------------------------------------------------------<br>&quot;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.&quot;
<br>Indira Gandhi<br>====================================<br>registered Linux user # 386432<br>get counted at <a href="http://counter.li.org" target="_blank">http://counter.li.org</a><br>----------------------------------------------------------------
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Flávio Codeço Coelho<br>----------------------------------------------------------------<br>&quot;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.&quot;
<br>Indira Gandhi<br>====================================<br>registered Linux user # 386432<br>get counted at <a href="http://counter.li.org">http://counter.li.org</a><br>----------------------------------------------------------------