On Fri, Jun 24, 2011 at 9:44 AM, Cal Leeming [Simplicity Media Ltd] <cal.leem...@simplicitymedialtd.co.uk> wrote: > > > On Fri, Jun 24, 2011 at 2:34 AM, Russell Keith-Magee > <russ...@keith-magee.com> wrote: >> >> On Fri, Jun 24, 2011 at 9:28 AM, Cal Leeming [Simplicity Media Ltd] >> <cal.leem...@simplicitymedialtd.co.uk> wrote: >> > +1 on this new feature. >> > For those that don't understand how this impacts performance, I'm >> > dedicating >> > a chunk of the (soon to come) webcast to explaining how this works and >> > the >> > future ideas for monkey-patching the ORM with deferred execution (which >> > basically means to make this a 99% drop-in replacement). >> > For those testing this new DSE feature, please remember to use manual >> > transactions, perform dryrun's first, and keep the chunk size low (as >> > these >> > are all factors which need to be changed based on what your data is, and >> > what you are doing with it). >> >> For the record, Alex Gaynor prepared a patch at DjangoCon Europe that >> adds bulk inserts to Django's ORM. >> >> http://paste.pocoo.org/show/404031/ >> >> In brief, it means that: >> >> >>> Entry.objects.bulk_create([ >> ... Entry(headline="Django 1.0 Released"), >> ... Entry(headline="Django 1.1 Announced"), >> ... Entry(headline="Breaking: Django is awesome") >> ... ]) > > Oh, that's a big game changer then. If bulk_create() is considered for the > core, then that means we have a real good chance of getting bulk_update() > considered too. But, some thought would need to go into how the syntax > looks.. My guess is it would either be a monkey patch with some defers, then > a call to bulk_update() at the end (how the hell this would work into > automated transaction management I don't know). Or, it'd be a set of new > functions (i.e. start_bulk_update(), add_bulk_update(), > execute_bulk_update() ), or something like that.. > Russell, should we get a ticket created for bulk_update to discuss how this > should be done? Or should a proposal be drawn up first and submitted for > comments?
I think some mailing list discussion is warranted -- bulk insert has a clear and obvious SQL interpretation; it isn't immediately clear to me what bulk-update means from a SQL perspective, and why it isn't just a thin layer of data manipulation over the top of a couple of existing Django update calls. For the record, #7596 is the ticket for bulk insert. Yours, Russ Magee %-) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.