Re: Ann: DSE v.3.0.0 Beta #1
On Fri, Jun 24, 2011 at 9:28 AM, Cal Leeming [Simplicity Media Ltd]
<cal.leeming@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")
... ])
will insert three objects with a single SQL INSERT statement (there
are a couple of other caveats; see the patch for details and docs).
The upside to this -- using bulk inserts for just the permissions
table resulted in a 30% speedup for the PostgreSQL test suite.
The patch has been sitting in my review pile since the conference; as
soon as I get a few spare seconds to scratch myself, I intend to
review it so we can get it into trunk. If anyone else wants to review,
they're most welcome to do so.
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home