When defining a model using the meta property, index_together does column order matter?
In other words, is there a difference between
Class myModel(models.Model): name = models.CharField(max_length=100) address = models.CharField(max_length=100) favorite_color = models.CharField(max_length=20) class Meta: index_together = ('name', 'address', 'favorite_color')
against
Class myModel(models.Model): name = models.CharField(max_length=100) address = models.CharField(max_length=100) favorite_color = models.CharField(max_length=20) class Meta: index_together = ('favorite_color', 'name', 'address')
I just ask, because I noticed, looking at the structure of the table, each column in the key has the property "index in key". MySQL / PostgreSQL expects columns to be queried in this order?
As an aside, is there a big difference between indexing columns together and separately?
sql django mysql postgresql
Luke sapan
source share