On Saturday 04 March 2006 14:47, Russell Keith-Magee wrote:

> The unit tests all pass with this change. However, I don't have a
> readily available source of 20000 interrelated objects to stress test
> the algorithm. Could you please check that this 1) actually fixes
> your problem, and 2) gives you the right results.

Yep, works a treat (and was definitely failing without it, same error as 
before) -- certainly item 1), I haven't checked 2) very carefully, but 
I'm pretty sure my migration script would have thrown duplicate key 
errors if things hadn't been deleted properly.

I consider that a fairly good stress test of deleting in general, and 
the chunking you just added.  The models in my app are highly 
interrelated with foreign keys everwhere (often multiple to the same 
table etc).  The only thing it doesn't include is one-to-one relations, 
since I didn't manage to get them to work when I was building the 
models (though I could have used them).

Of course, with problems like stack limits I was encountering, you can't 
guarantee it will work for larger volumes of data, because it will 
depend on the size of 'many' in 'many-to-one', but for day-to-day usage 
it should be more than adequate.  For the bulk migration I was doing, 
you would be much better writing some custom SQL, but I was feeling 
lazy so wrote it in Python.

Thanks for all your great work,

Luke

-- 
"The first ten million years were the worst. And the second ten 
million, they were the worst too. The third ten million, I didn't enjoy 
at all. After that I went into a bit of a decline." (Marvin the 
paranoid android)

Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to