Hi all,

I read django doc on 'bulk_update() 
<https://docs.djangoproject.com/en/4.1/ref/models/querysets/#bulk-update>'  
It said that generally it creates one single query to do so, but in a 
project I have has 'a_model.objects.bulk_update(update_list, 
fields=updated_keys), it actually generates N number of SELECT statements 
where N is the size of 'update_list'  This is being flagged as Select N+1 
bug.

Why did bulk_update() not generate a single query as it advertises? How 
would I fix this Select N+1 issue to increase the performance?

Kind Regards,

Nick

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/dc688786-e8db-4071-b1d3-13b2a17436bbn%40googlegroups.com.

Reply via email to