Re: [Django] #18729: Admin changelist view defaults to `DISTINCT`, unusable on reasonably sized databases

2016-12-06 Thread Django
#18729: Admin changelist view defaults to `DISTINCT`, unusable on reasonably 
sized
databases
-+-
 Reporter:  Henrique C. Alves|Owner:  AlexMalek
 Type:  Bug  |   Status:  closed
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  admin sql distinct   | Triage Stage:  Accepted
  slow performance   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"8f76673f344750d863ae0856040d89c9f67baa8c" 8f76673]:
 {{{
 #!CommitTicketReference repository=""
 revision="8f76673f344750d863ae0856040d89c9f67baa8c"
 Fixed #18729 -- Made admin changelist not use distinct() if a list_filter
 doesn't require it.
 }}}

--
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/072.c5deca41a11b42159dac2b1674b122ff%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #18729: Admin changelist view defaults to `DISTINCT`, unusable on reasonably sized databases

2016-10-26 Thread Django
#18729: Admin changelist view defaults to `DISTINCT`, unusable on reasonably 
sized
databases
-+-
 Reporter:  Henrique C. Alves|Owner:  AlexMalek
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  admin sql distinct   | Triage Stage:  Accepted
  slow performance   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * needs_better_patch:  1 => 0


Comment:

 [https://github.com/django/django/pull/7422 PR]

--
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/072.443580386ff8155f6936096477ecc485%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #18729: Admin changelist view defaults to `DISTINCT`, unusable on reasonably sized databases

2014-08-04 Thread Django
#18729: Admin changelist view defaults to `DISTINCT`, unusable on reasonably 
sized
databases
-+-
 Reporter:  hcarvalhoalves   |Owner:  AlexMalek
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  admin sql distinct   | Triage Stage:  Accepted
  slow performance   |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  1
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by timo):

 * needs_better_patch:  0 => 1
 * stage:  Ready for checkin => Accepted


Comment:

 I left comments for improvement on the PR. Please uncheck "Patch needs
 improvement" when you update it, thanks.

-- 
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/072.9f032d10ff2b0c8f8eb5de172c1b01c2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #18729: Admin changelist view defaults to `DISTINCT`, unusable on reasonably sized databases

2014-07-27 Thread Django
#18729: Admin changelist view defaults to `DISTINCT`, unusable on reasonably 
sized
databases
-+-
 Reporter:  hcarvalhoalves   |Owner:  AlexMalek
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  admin sql distinct   | Triage Stage:  Ready for
  slow performance   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by slurms):

 * stage:  Accepted => Ready for checkin


-- 
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/072.4f64eda2c7dd3b4ee18ad5940289169e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #18729: Admin changelist view defaults to `DISTINCT`, unusable on reasonably sized databases

2014-06-16 Thread Django
#18729: Admin changelist view defaults to `DISTINCT`, unusable on reasonably 
sized
databases
-+-
 Reporter:  hcarvalhoalves   |Owner:  AlexMalek
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  admin sql distinct   | Triage Stage:  Accepted
  slow performance   |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by timo):

 * stage:  Unreviewed => Accepted


-- 
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/072.0415837f0a157f881351a1f92bca6409%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #18729: Admin changelist view defaults to `DISTINCT`, unusable on reasonably sized databases

2014-06-01 Thread Django
#18729: Admin changelist view defaults to `DISTINCT`, unusable on reasonably 
sized
databases
-+-
 Reporter:  hcarvalhoalves   |Owner:  AlexMalek
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  admin sql distinct   | Triage Stage:
  slow performance   |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by AlexMalek):

 * has_patch:  0 => 1


Comment:

 Proposed patch w/ tests:

 https://github.com/amalek215/django/compare/ticket_18729

-- 
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/072.515c4cf068f647e2f9f297818dcd3dae%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #18729: Admin changelist view defaults to `DISTINCT`, unusable on reasonably sized databases

2014-05-30 Thread Django
#18729: Admin changelist view defaults to `DISTINCT`, unusable on reasonably 
sized
databases
-+-
 Reporter:  hcarvalhoalves   |Owner:  AlexMalek
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  admin sql distinct   | Triage Stage:
  slow performance   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by AlexMalek):

 * owner:  nobody => AlexMalek
 * status:  new => assigned


-- 
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/072.c25d596bcfff55cf54ee10f2c9efdc2c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #18729: Admin changelist view defaults to `DISTINCT`, unusable on reasonably sized databases

2014-05-19 Thread Django
#18729: Admin changelist view defaults to `DISTINCT`, unusable on reasonably 
sized
databases
-+-
 Reporter:  hcarvalhoalves   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  admin sql distinct   | Triage Stage:
  slow performance   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by AlexMalek):

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


Comment:

 I think it is a different issue.
 It is possible to alter the check that examines list_filter to determine
 if distinct() is needed based on if the field appears in the query/request
 but this does not address the deeper issues in #15819
 For example in Django 1.5.2 I think the following changes solves the
 issue:

 django/contrib/admin/util.py:
 20c20
 < def lookup_needs_distinct(opts, lookup_path, query_dict=None):
 ---
 > def lookup_needs_distinct(opts, lookup_path):
 29,31c29
 <  not field.field.unique) and
 <(query_dict is None or (field_name in
 ",".join(query_dict.keys(
 <   ):
 ---
 >  not field.field.unique)):

 django/contrib/admin/views/main.py:
 128c128
 <   field_path,
 lookup_params))
 ---
 >   field_path))

-- 
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/072.6f72a6a4c78c9ea3aae640ff0e8696f8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #18729: Admin changelist view defaults to `DISTINCT`, unusable on reasonably sized databases

2012-09-07 Thread Django
#18729: Admin changelist view defaults to `DISTINCT`, unusable on reasonably 
sized
databases
-+-
 Reporter:  hcarvalhoalves   |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:  admin sql distinct   | Triage Stage:
  slow performance   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by tswicegood):

 * status:  new => closed
 * resolution:   => duplicate
 * needs_tests:   => 0
 * needs_better_patch:   => 0
 * needs_docs:   => 0
 * type:  Uncategorized => Bug


Comment:

 Resolving this as a dupe #15819.  Looks like that issue has all of the
 same points here and fixes this issue.

 Feel free to re-open if I missed something in this ticket that's different
 than #15819.

-- 
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 https://groups.google.com/groups/opt_out.




[Django] #18729: Admin changelist view defaults to `DISTINCT`, unusable on reasonably sized databases

2012-08-07 Thread Django
#18729: Admin changelist view defaults to `DISTINCT`, unusable on reasonably 
sized
databases
-+-
 Reporter:   |  Owner:  nobody
  hcarvalhoalves | Status:  new
 Type:   |Version:  master
  Uncategorized  |   Keywords:  admin sql distinct slow performance
Component:   |  Has patch:  0
  contrib.admin  |  UI/UX:  0
 Severity:  Normal   |
 Triage Stage:   |
  Unreviewed |
Easy pickings:  0|
-+-
 The default behavior on the admin is not usable for reasonably sized
 tables (a couple thousand tuples is enough for >1s queries).

 Right now, it always includes a `DISTINCT` clause if you add a M2M field
 on `list_filter`, even if you're not applying any filters. Use of
 `DISTINCT` is known to be painfully slow, and even more so without a
 `WHERE` clause, because it forces SQL databases into a full table scan.
 The behavior is not easily overridden because the logic is scattered on a
 couple `ChangeList` methods
 
(https://github.com/django/django/blob/master/django/contrib/admin/views/main.py#L299).

 The only solution right now is not including a M2M field on `list_filter`
 and limiting functionality. It would be better if that behavior could be
 overridden (a `use_distinct` parameter on `get_query_set`?) or, optimally,
 moving this logic somewhere else. Ticket #15819 already includes a patch
 for that.

-- 
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 https://groups.google.com/groups/opt_out.