Index some fields

Issue #104 closed
Former user created an issue

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)

  1. Patrick Samson repo owner

    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.

  2. Log in to comment