[horde] A new, faster history migration script.
Josh Endries
josh at endries.org
Mon Dec 4 13:53:29 PST 2006
Hello,
I'm upgrading my Horde install from 3.0 to 3.1, so I ran the upgrade on
a test machine to make sure data wouldn't be lost, etc.. The history
migration script was still going after three days (!) so I just canceled
it. That is simply unacceptable down time for me, so I rewrote the
script to be faster. For my database my new script is over 3000 times as
fast and, AFAICT, runs the same queries and doesn't lose data or do
anything different (other than the PHP logic).
I'm posting here to hopefully have more eyes spot problems or, if not,
so others can use it. I'm not guaranteeing that it's DB-agnostic, but
the only trouble query is probably the multi-table delete at the bottom.
I'm also not super familiar with Horde so it may have problems that lose
data or make things unusable, hopefully someone smarter can figure that out.
Please let me know what you think. If there are problems, let me know
and I'll see if I can fix them without killing the speed. :) I will most
likely run this on my production database this weekend, after another
round of post-upgrade tests.
Thanks,
Josh
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: datatree_history_migration.php
Url: http://lists.horde.org/archives/horde/attachments/20061204/e6550744/datatree_history_migration.ksh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.horde.org/archives/horde/attachments/20061204/e6550744/signature.bin
More information about the horde
mailing list