Re: [Django] #17659: django_admin_log searches are slow

2019-01-24 Thread Django
#17659: django_admin_log searches are slow
--+
 Reporter:  anonymous |Owner:  keeff
 Type:  Cleanup/optimization  |   Status:  new
Component:  contrib.admin |  Version:  1.3
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+

Comment (by Tim Graham):

 #30122 is a duplicate.

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.c2e8f1a71f240111ae6956707c3a5b74%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #17659: django_admin_log searches are slow

2015-12-15 Thread Django
#17659: django_admin_log searches are slow
--+
 Reporter:  anonymous |Owner:  keeff
 Type:  Cleanup/optimization  |   Status:  new
Component:  contrib.admin |  Version:  1.3
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+

Comment (by adamchainz):

 I've just had to migrate our django_admin_log table (4.6 million rows) to
 add an index on (content_type_id, object_id) for the history view. I've
 also removed the plain content_type_id index since it is then a redundant
 as a prefix index.

 Importantly, I had to change object_id to a varchar(255) since you can't
 index a text column on MySQL (idk about other DBs). You can index a prefix
 of up to 255 characters which would suffice (most object_ids are a handful
 of characters, being simple integers - being a TextField is presumably for
 completeness) - but Django models don't have this option yet...

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.9c9c4b4227db59f9b0fc58ed863334f9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #17659: django_admin_log searches are slow

2015-12-01 Thread Django
#17659: django_admin_log searches are slow
--+
 Reporter:  anonymous |Owner:  keeff
 Type:  Cleanup/optimization  |   Status:  new
Component:  contrib.admin |  Version:  1.3
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+

Comment (by claudep):

 Yes, the patch should include the migration.

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.cb4482619230dcd46c79a7ee5ee444e9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #17659: django_admin_log searches are slow

2015-12-01 Thread Django
#17659: django_admin_log searches are slow
--+
 Reporter:  anonymous |Owner:  keeff
 Type:  Cleanup/optimization  |   Status:  new
Component:  contrib.admin |  Version:  1.3
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+

Comment (by edruid):

 This would be nice if it were to be completed some time in the not distant
 future.

 However I think an index_together on content_type_id and object_id would
 be better as a search for object_id without knowing what type of object
 one is looking for is a strange query.

 I could add a patch for this if it would move things along quicker. If I
 do, should I include a migration file?

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.4db17c3165336905f4dc8a06c275696a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #17659: django_admin_log searches are slow

2012-02-08 Thread Django
#17659: django_admin_log searches are slow
--+
 Reporter:  anonymous |Owner:  keeff
 Type:  Cleanup/optimization  |   Status:  new
Component:  contrib.admin |  Version:  1.3
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by akaariai):

 * needs_better_patch:  0 => 1
 * has_patch:  0 => 1
 * stage:  Unreviewed => Accepted


Comment:

 I wonder if it is really necessary to have the index for object_repr alone
 though. Every django installation using admin would need to pay the price
 of that index, but it is not needed in stock installations. I have written
 multiple django apps, and never needed object_repr lookups. You can add
 the index by hand if needed.

 So, I would say +1 on the object_id index, and more proof for the need of
 object_repr index.

 Marking as accepted on the basis of need for object_id index. Although
 query plans with the index and without it are still missing.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #17659: django_admin_log searches are slow

2012-02-08 Thread Django
#17659: django_admin_log searches are slow
-+-
 Reporter:  anonymous|Owner:  keeff
 Type:   |   Status:  new
  Cleanup/optimization   |  Version:  1.3
Component:  contrib.admin|   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by anonymous):

 object_id is used in stock django, i.e. history_view() in
 contrib/admin/options.py.  The index here is a clear win for any who use
 django_admin_log.

 object_repr is often used in custom forms and other external code, one
 common example is to implement a global history search.  Doing this via
 object_id is not reasonable since this would involve working out the
 object_id for all matching objects in every extant model, and even then it
 may not be viable to match history for deleted objects.  Such forms should
 be efficient without needing a local modification to
 contrib/admin/models.py

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #17659: django_admin_log searches are slow

2012-02-07 Thread Django
#17659: django_admin_log searches are slow
-+-
 Reporter:  anonymous|Owner:  keeff
 Type:   |   Status:  new
  Cleanup/optimization   |  Version:  1.3
Component:  contrib.admin|   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by akaariai):

 * cc: anssi.kaariainen@… (added)


Comment:

 Adding some indexes makes sense to me. However, it would be nice to
 confirm both indexes are actually needed.

 Is it possible to provide some data on how these indexes are used in the
 queries Django generates for realworld data? EXPLAIN ANALYZE from
 PostgreSQL would be perfect.

 Multicolumn index could be the best solution here, but unfortunately that
 isn't currently supported. If possible, data for multicolumn index too
 would be great.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #17659: django_admin_log searches are slow

2012-02-07 Thread Django
#17659: django_admin_log searches are slow
-+-
 Reporter:  anonymous|Owner:  keeff
 Type:   |   Status:  new
  Cleanup/optimization   |  Version:  1.3
Component:  contrib.admin|   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by keeff):

 * owner:  nobody => keeff
 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #17659: django_admin_log searches are slow

2012-02-07 Thread Django
#17659: django_admin_log searches are slow
--+
 Reporter:  anonymous |  Owner:  nobody
 Type:  Cleanup/optimization  | Status:  new
Component:  contrib.admin |Version:  1.3
 Severity:  Normal|   Keywords:
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+
 Queries against django_admin_log are slow because the soft-reference
 columns are not indexed.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.