#22125: Unnecessary creation of index for ManyToManyField
-------------------------------------+-------------------------------------
Reporter: tbhtan3@… | Owner: bwreilly
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: db-indexes | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Phil Krylov):
* cc: Phil Krylov (added)
Comment:
Replying to [comment:17 Anssi Kääriäinen]:
> We should just skip index creation for m2m tables unless the user asks
for single column index. I am not sure if we should add flags to m2m field
for creation or skipping of these indexes.
I would say that if someone needs a single column index in their through
table, they can use an explicit through table without `db_index=False` on
that (`ForeignKey`) column.
--
Ticket URL: <https://code.djangoproject.com/ticket/22125#comment:21>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/075.115047e1c0707a91c4b7f596fa1d08ff%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.