#36414: Add an index to object_id on django_admin_log
-------------------------------------+-------------------------------------
Reporter: Stanislas Guerra | Type:
| Cleanup/optimization
Status: new | Component:
| contrib.admin
Version: 5.1 | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Hi,
As the database grows, the history page of an object in the admin take
more an more time to load due to the lack of an SQL Index on the
''object_id'' column of the ''django_admin_log'' table.
I manually added the following to solve the issue:
{{{
CREATE INDEX django_admin_log_object_id ON django_admin_log (object_id);
}}}
I can provide a patch if it can help.
--
Ticket URL: <
https://code.djangoproject.com/ticket/36414>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.