#30122: Add index in object_id column in LogEntry table to make fetch query 
faster.
-------------------------------------+-------------------------------------
     Reporter:  Shashank Parekh      |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  contrib.admin        |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Simon Charette):

 If we decide to add an index we should consider a composite
 `(content_type_id, object_id)` one and maybe make the `content_type`
 foreign key `db_index=False` given there's no use case for querying
 `LogEntry` by `object_id` without `content_type_id` and that most (if not
 all) supported database engines are able to use the first parts of a
 composite index rendering the `content_type_id` index useless.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30122#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.284ab4118b97d34e4cfc2191ad4c7945%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to