There are only about 7,000 LegalDocument instances currently in the database, so search and sort performance isn't an issue right now, but could be if new content types are added. Now is a good time to add them.
Add indexes for the following fields to this model:
source_id (Postgres does not automatically add indexes for foreign keys)
source_ref (the foreign identifier, frequently used for lookups)
There are only about 7,000
LegalDocument
instances currently in the database, so search and sort performance isn't an issue right now, but could be if new content types are added. Now is a good time to add them.Add indexes for the following fields to this model:
source_id
(Postgres does not automatically add indexes for foreign keys)source_ref
(the foreign identifier, frequently used for lookups)doc_class
(the type of document)effective_date
(used in ordering)publication_date
(used in ordering)