Opened 18 years ago
Closed 18 years ago
#3142 closed enhancement (fixed)
[patch] Faster many-to-many field assignment
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Currently code such as article.publications = list_of_n_publications
uses n SELECTs. This simple patch adds all related m2m objects at once, thus reducing the amount of SELECTs to one.
Test coverage: Django tests in modeltests/many_to_many cover this area and they all pass.
Attachments (1)
Change History (2)
by , 18 years ago
Attachment: | faster_m2m_assignment.diff added |
---|
comment:1 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Patch against trunk r4201