Opened 4 months ago
Closed 4 months ago
#36414 closed Cleanup/optimization (duplicate)
Add an index to object_id on django_admin_log
Reported by: | Stanislas Guerra | Owned by: | |
---|---|---|---|
Component: | contrib.admin | Version: | 5.1 |
Severity: | Normal | Keywords: | |
Cc: | Stanislas Guerra | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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.
Note:
See TracTickets
for help on using tickets.
Duplicate of #17659, #30122,