[Django]-Is django's bulk_create atomic?

3👍

bulk_create() produces single query if there is no batch_size set ( except for SQLite where batch is 999)

You should do transaction.atomic() block only if you set batch_size and you want all previous batches to be reverted

0👍

The answer to the related question Transaction atomic needed for bulk create? indicates that bulk_create() is atomic by default, therefore there is no need for transaction.atomic().

👤elukem

Leave a comment