← All notes

Insert many Django objects with bulk_create

Answer: bulk_create() inserts the provided list of objects and returns created objects as a list, in the same order as provided. The method is efficient (generally only 1 query, no matter how many objects there are).

Caveats

The model's save() method will not be called. The pre_save and post_save signals will not be sent. Child models in a multi-table inheritance scenario are not supported. If the primary key is an AutoField and ignore_conflicts is False, only certain databases return that attribute (currently PostgreSQL, MariaDB, and SQLite 3.35+). ignore_conflicts and update_conflicts apply when insertion fails on conflicts.

The SQL underneath

The INSERT statement comes in three basic forms: INSERT INTO table VALUES(...), INSERT INTO table SELECT ..., and INSERT INTO table DEFAULT VALUES. A multi-row VALUES insert is the matching SQL form. A DEFAULT VALUES statement inserts a single new row into the named table. The upsert clause is not allowed on some INSERT forms in SQLite.

| bulk_create | INSERT | |---|---| | bulk_create | Inserts a list of objects, often in 1 query | | save() | Not called; pre_save and post_save are not sent | | VALUES | Basic INSERT form for supplied rows | | DEFAULT VALUES | Inserts a single new row |

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Django docs, QuerySet API reference; SQLite, INSERT. BSD-3-Clause; Public-Domain. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Django docs, QuerySet API reference; SQLite, INSERT. BSD-3-Clause; Public-Domain.

Cite this

Permanent ID: iil:note:n03dyp7y

iinventedlight. 2026. "Insert many Django objects with bulk_create." iinventedlight Library, iil:note:n03dyp7y, version of 2026-11-19. https://iinventedlight.com/library/notes/django-bulk-create/. License: CC-BY-4.0.

@misc{iil_note_n03dyp7y,
  author = {{iinventedlight}},
  title = {{Insert many Django objects with bulk\_create}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-19},
  url = {https://iinventedlight.com/library/notes/django-bulk-create/},
  note = {Permanent ID iil:note:n03dyp7y. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/django-bulk-create.md.