Opened 12 years ago
Closed 8 years ago
#18669 closed Bug (fixed)
QuerySet.bulk_create should batch if no AutoField
Reported by: | Jeremy Dunck | Owned by: | Jeremy Dunck |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.4 |
Severity: | Normal | Keywords: | QuerySet.bulk_create |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
.bulk_create branches on can_combine_inserts_with_and_without_auto_increment_pk *and* _meta.has_auto_field, but it should be
can_combine_inserts_with_and_without_auto_increment_pk or not _meta.has_auto_field.
This buglet means that even if the model doesn't have an autofield, the list will be partitioned into models with and without the PK, resulting in unnecessary query executions.
I'm assigning myself as owner because I intend to patch it.
Change History (4)
comment:1 by , 12 years ago
Triage Stage: | Unreviewed → Accepted |
---|---|
Type: | Uncategorized → Bug |
comment:2 by , 9 years ago
Keywords: | QuerySet.bulk_create added |
---|
comment:4 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Looks like a bug to me.