Hi there,

a fun issue came up on IRC today: Even when in autocommit mode, Django 
starts a transaction when doing Model.objects.create 
(https://github.com/django/django/blob/fb2964a4106b1282c4179b6fbbd0374f5be1ccac/django/db/models/base.py#L752).
 
This makes some sense when there are parents to be saved also, but imo 
results in a rather high database roundtrip number for the simple case 
where there is a single model without inheritance. Does anyone know why we 
do this?

I've created a really simple patch 
https://github.com/django/django/pull/10448 which already (mostly) passes 
the testsuite.

Cheers,
Florian

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/9fe4e535-f19d-4a36-85ba-82db43363ebc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to