- edited description
-
assigned issue to
Index some fields
Issue #104
closed
Why not adding database indexes (db_index=True) on some fields?
I think of these Message fields:
- sender, recipient, parent, thread,
- email,
- sent_at, read_at, replied_at
- sender_archived, recipient_archived,
- sender_deleted_at, recipient_deleted_at,
- moderation_status.
Regards,
Matthieu
Comments (2)
-
repo owner -
repo owner - changed status to closed
An index is implicitly created for ForeignKey fields, which is the case for: sender, recipient, moderation_by, parent, thread. Any queryset in the app has a filter based on sender and/or recipient, so these are the only indexes useful and used, as verified with query plans.
- Log in to comment