class Comments(models.Model):
content = models.ForeignKey(Content)
Do I need to add a db_index to "content"? Or would that automatically be indexed because it's a foreign key?
Unless specified otherwise, an index will be created for a ForeignKey. Relevant source code:
class ForeignKey(RelatedField, Field):
# snip
def __init__(self, to, to_field=None, rel_class=ManyToOneRel, **kwargs):
# snip
if 'db_index' not in kwargs:
kwargs['db_index'] = True
db_index=False: code.djangoproject.com/ticket/13730