[Django] #36414: Add an index to object_id on django_admin_log

2 views
Skip to first unread message

Django

unread,
May 23, 2025, 10:02:20 AMMay 23
to django-...@googlegroups.com
#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.

Django

unread,
May 23, 2025, 10:19:06 AMMay 23
to django-...@googlegroups.com
#36414: Add an index to object_id on django_admin_log
-------------------------------------+-------------------------------------
Reporter: Stanislas Guerra | Owner: (none)
Type: | Status: closed
Cleanup/optimization |
Component: contrib.admin | Version: 5.1
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

* resolution: => duplicate
* status: new => closed

Comment:

Duplicate of #17659, #30122,
--
Ticket URL: <https://code.djangoproject.com/ticket/36414#comment:1>
Reply all
Reply to author
Forward
0 new messages