<div>On Thu, Dec 10, 2009 at 8:12 PM, Marius Gedminas <span dir="ltr">&lt;<a href="mailto:marius@gedmin.as">marius@gedmin.as</a>&gt;</span> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Thu, Dec 10, 2009 at 02:07:06PM -0500, Jim Fulton wrote:<br>
&gt; On Thu, Dec 10, 2009 at 1:50 PM, Marius Gedminas &lt;<a href="mailto:marius@gedmin.as">marius@gedmin.as</a>&gt; wrote:<br>
&gt; &gt; On Thu, Dec 10, 2009 at 12:41:11PM -0500, Jim Fulton wrote:<br>
&gt; &gt;&gt; On Thu, Dec 10, 2009 at 11:54 AM, Marius Gedminas &lt;<a href="mailto:marius@gedmin.as">marius@gedmin.as</a>&gt; wrote:<br>
&gt; &gt;&gt; In 3.9 for FileStorage, if you give a starting tid that is toward the<br>
&gt; &gt;&gt; end of the file,<br>
&gt; &gt;&gt; it will scan backward, saving a lot of time.<br>
&gt; &gt;<br>
&gt; &gt; Ah, but how can I get a valid tid that is toward the end of the file?<br>
&gt; &gt; I assume that if I give a tid that doesn&#39;t exist, I&#39;ll get an error --<br>
&gt; &gt; which is the behavior oldstate() exhibits -- rather than the next<br>
&gt; &gt; existing transaction after that timestamp, or I could fudge by getting<br>
&gt; &gt; the current timestamp and subtracting 24 hours.<br>
&gt;<br>
&gt; No, the iterator starts at the first transactions who&#39;s tid is &gt;= the<br>
&gt; start tid.<br>
&gt;<br>
&gt; So, guess a time and use repr(ZODB.TimeStamp.TimeStamp(...))<br>
<br>
</div>Cool!  Thank you,<br>
<br>
Marius Gedminas<br>
<font color="#888888">--<br></font><br></blockquote><div><br></div><div>another way is to use the fstools.prev_txn starting at the end of the file  to grab the newest transactions, the script i send to the list last week uses it to poke a large zodb to just get the contents of the last 20 transactions without iterating through the whole thing or guessing a timestamp.</div>
<div> </div></div><a href="https://mail.zope.org/pipermail/zodb-dev/attachments/20091207/531fc1e4/attachment.obj">https://mail.zope.org/pipermail/zodb-dev/attachments/20091207/531fc1e4/attachment.obj</a><div><br></div><div>
cheers,</div><div><br></div><div>kapil</div>