So Just to be clear before I get started playing with this, Should I be working in test at first? I'm feeling like yes...<br><br>I should insert a row into members for the male's 'birthday' 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"><<a href="mailto:kop@meme.com">kop@meme.com</a>></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>
> On 11/18/2009 02:52:16 PM, Karl O. Pinc wrote:<br>
> > On 11/18/2009 02:09:59 PM, Lacey Maryott Roerish wrote:<br>
> > > Is this still running Karl?<br>
> ><br>
> > Yes. Interpolation is really slow when working<br>
> > with the "old style" codes. There might be<br>
> > a faster way to structure things than a single<br>
> > delete statement, perhaps deleting one at a time<br>
> > enter from earlier to later or later to<br>
<br>
</div>I just calculated it'll take at least another 12<br>
hours and decided to abort it.<br>
<div class="im"><br>
><br>
> Thinking back to the conversion I bet the trick is<br>
> to put a "regular" census row at "both ends" of the<br>
> time period that you want to delete, then delete, then<br>
> remove the "regular" 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 "temporary regular<br>
census rows" to a year or less. I believe that<br>
interpolating around "old style" 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 "old style" census<br>
rows. (This is not true when inserting an "old style"<br>
census row as the last census of an individual,<br>
but that'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't hurt to run one before you start if<br>
you'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 "bracket" 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's not worth the time spent thinking about<br>
or playing around with the actual requirements.)<br>
<br>
Because we've always planned to get rid of them<br>
the code was never optimized to deal with interpolating<br>
changes made to the "old style" census rows, and I<br>
don't imagine it's worth spending any time on it now.<br>
<div><div></div><div class="h5"><br>
Karl <<a href="mailto:kop@meme.com">kop@meme.com</a>><br>
Free Software: "You don't pay back, you pay forward."<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>