database-indexes

Django: Does unique_together imply db_index=True in the same way that ForeignKey does?

Django: Does unique_together imply db_index=True in the same way that ForeignKey does? Question: A field on a model, foo = models.ForeignKey(Foo) will automatically add a database index for the column, in order to make look-ups faster. That’s good and well, but Django’s docs don’t state whether the fields in a model-meta’s unique_together receive the same …

Total answers: 5