So Just to be clear before I get started playing with this, Should I be working in test at first? I&#39;m feeling like yes...<br><br>I should insert a row into members for the male&#39;s &#39;birthday&#39; that is a normal A row, and then a row on his first day into the group as a normal C row?   Or Am I doing a real row on either end of each year?<br>
<br>Thx<br>L<br><br><div class="gmail_quote">On Wed, Nov 18, 2009 at 10:04 PM, Karl O. Pinc <span dir="ltr">&lt;<a href="mailto:kop@meme.com">kop@meme.com</a>&gt;</span> 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 class="im">On 11/18/2009 03:02:38 PM, Karl O. Pinc wrote:<br>
&gt; On 11/18/2009 02:52:16 PM, Karl O. Pinc wrote:<br>
&gt; &gt; On 11/18/2009 02:09:59 PM, Lacey Maryott Roerish wrote:<br>
&gt; &gt; &gt; Is this still running Karl?<br>
&gt; &gt;<br>
&gt; &gt; Yes.   Interpolation is really slow when working<br>
&gt; &gt; with the &quot;old style&quot; codes.   There might be<br>
&gt; &gt; a faster way to structure things than a single<br>
&gt; &gt; delete statement, perhaps deleting one at a time<br>
&gt; &gt; enter from earlier to later or later to<br>
<br>
</div>I just calculated it&#39;ll take at least another 12<br>
hours and decided to abort it.<br>
<div class="im"><br>
&gt;<br>
&gt; Thinking back to the conversion I bet the trick is<br>
&gt; to put a &quot;regular&quot; census row at &quot;both ends&quot; of the<br>
&gt; time period that you want to delete, then delete, then<br>
&gt; remove the &quot;regular&quot; census rows you added.<br>
<br>
</div>The other requirement to keep it from taking forever is<br>
to keep the interval between the 2 &quot;temporary regular<br>
census rows&quot; to a year or less.  I believe that<br>
interpolating around &quot;old style&quot; census codes<br>
is a O(n^2) operation, which means that the<br>
time taken is proportional to the square of<br>
the number of contiguous &quot;old style&quot; census<br>
rows.  (This is not true when inserting an &quot;old style&quot;<br>
census row as the last census of an individual,<br>
but that&#39;s immaterial here.)  As the number<br>
of census rows goes up the time taken gets out of<br>
control.  I was trying to delete about 3,500 rows at once and<br>
the process of interpolation was going to create and destroy<br>
as many MEMBERS rows as it had ever created<br>
or destroyed in all the interpolation ever done<br>
in Babase 2.0.<br>
<br>
Lacey, could you please try the above technique and see<br>
how it works out for you?   If you find the system<br>
getting slower over time you may need to login as<br>
babase_admin and run a VACUUM ANALYZE; command<br>
to clean the cobwebs out of the whole database.<br>
It wouldn&#39;t hurt to run one before you start if<br>
you&#39;ve just finished copying babase_test from babase.<br>
(Or is that part of the copy procedure?)<br>
<br>
If it makes you more comfortable start by deleting<br>
only a month at a time and make the intervals larger<br>
if it does not take too long.  (It is however important<br>
to &quot;bracket&quot; the old-style census rows with regular<br>
census rows during the deletion.  You may be able<br>
to get away with having, say, having a regular<br>
census row only at the upper end of the time interval<br>
but it&#39;s not worth the time spent thinking about<br>
or playing around with the actual requirements.)<br>
<br>
Because we&#39;ve always planned to get rid of them<br>
the code was never optimized to deal with interpolating<br>
changes made to the &quot;old style&quot; census rows, and I<br>
don&#39;t imagine it&#39;s worth spending any time on it now.<br>
<div><div></div><div class="h5"><br>
Karl &lt;<a href="mailto:kop@meme.com">kop@meme.com</a>&gt;<br>
Free Software:  &quot;You don&#39;t pay back, you pay forward.&quot;<br>
                 -- Robert A. Heinlein<br>
<br>
<br>
_______________________________________________<br>
Babase mailing list<br>
<a href="mailto:Babase@www.eco.princeton.edu">Babase@www.eco.princeton.edu</a><br>
<a href="http://www.eco.princeton.edu/mailman/listinfo/babase" target="_blank">http://www.eco.princeton.edu/mailman/listinfo/babase</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>- -<br>Lacey K. Maryott Roerish<br>Alberts Lab<br>Department of Biology<br>Duke University<br>ph: 919-660-7306<br>fax: 919-660-7293<br><a href="mailto:Lacey.Maryott@duke.edu">Lacey.Maryott@duke.edu</a><br>