Re: [Django] #15844: Filtering by related objects causes unnecessary extra db hits when using model inheritance

2015-10-03 Thread Django
#15844: Filtering by related objects causes unnecessary extra db hits when using
model inheritance
-+-
 Reporter:  emulbreh |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

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


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


Re: [Django] #15844: Filtering by related objects causes unnecessary extra db hits when using model inheritance

2015-10-03 Thread Django
#15844: Filtering by related objects causes unnecessary extra db hits when using
model inheritance
-+-
 Reporter:  emulbreh |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"fa2e1e633ac2073906ed3f1f32107d02331107aa" fa2e1e63]:
 {{{
 #!CommitTicketReference repository=""
 revision="fa2e1e633ac2073906ed3f1f32107d02331107aa"
 Refs #15844 -- Added tests for multi-table inheritance related object
 filtering efficiency.

 Fixed in 97774429aeb54df4c09895c07cd1b09e70201f7d.
 }}}

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


Re: [Django] #15844: Filtering by related objects causes unnecessary extra db hits when using model inheritance

2015-10-02 Thread Django
#15844: Filtering by related objects causes unnecessary extra db hits when using
model inheritance
-+-
 Reporter:  emulbreh |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * needs_better_patch:  1 => 0


Comment:

 Looks like this was fixed in Django 1.6 with
 97774429aeb54df4c09895c07cd1b09e70201f7d.

 [https://github.com/django/django/pull/5386 PR] to add a regression test.

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


Re: [Django] #15844: Filtering by related objects causes unnecessary extra db hits when using model inheritance

2011-09-14 Thread Django
#15844: Filtering by related objects causes unnecessary extra db hits when using
model inheritance
-+-
   Reporter:  emulbreh   |  Owner:  nobody
   Type:  Bug| Status:  new
  Milestone: |  Component:  Database layer
Version:  SVN|  (models, ORM)
 Resolution: |   Severity:  Normal
   Triage Stage:  Accepted   |   Keywords:
Needs documentation:  0  |  Has patch:  1
Patch needs improvement:  1  |Needs tests:  0
  UI/UX:  0  |  Easy pickings:  0
-+-
Changes (by ptone):

 * needs_better_patch:  0 => 1


Comment:

 Why were code comments deleted in patch? They still seem valid, otherwise
 they should be updated not deleted.

-- 
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] #15844: Filtering by related objects causes unnecessary extra db hits when using model inheritance

2011-08-17 Thread Django
#15844: Filtering by related objects causes unnecessary extra db hits when using
model inheritance
-+-
   Reporter:  emulbreh   |  Owner:  nobody
   Type:  Bug| Status:  new
  Milestone: |  Component:  Database layer
Version:  SVN|  (models, ORM)
 Resolution: |   Severity:  Normal
   Triage Stage:  Accepted   |   Keywords:
Needs documentation:  0  |  Has patch:  1
Patch needs improvement:  0  |Needs tests:  0
  UI/UX:  0  |  Easy pickings:  0
-+-
Changes (by emulbreh):

 * has_patch:  0 => 1
 * ui_ux:   => 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.



Re: [Django] #15844: Filtering by related objects causes unnecessary extra db hits when using model inheritance

2011-04-21 Thread Django
#15844: Filtering by related objects causes unnecessary extra db hits when using
model inheritance
-+-
   Reporter:  emulbreh   |  Owner:  nobody
   Type:  Bug| Status:  new
  Milestone: |  Component:  Database layer
Version:  SVN|  (models, ORM)
 Resolution: |   Severity:  Normal
   Triage Stage:  Accepted   |   Keywords:
Needs documentation:  0  |  Has patch:  0
Patch needs improvement:  0  |Needs tests:  0
 |  Easy pickings:  0
-+-
Changes (by carljm):

 * needs_better_patch:   => 0
 * stage:  Unreviewed => Accepted
 * easy:   => 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] #15844: Filtering by related objects causes unnecessary extra db hits when using model inheritance

2011-04-18 Thread Django
#15844: Filtering by related objects causes unnecessary extra db hits when using
model inheritance
--+-
 Reporter:  emulbreh  | Owner:  nobody
 Type:  Bug   |Status:  new
Milestone:| Component:  Database layer (models, ORM)
  Version:  SVN   |  Severity:  Normal
 Keywords:|  Triage Stage:  Unreviewed
Has patch:  0 |
--+-
 The failing test below illustrates the issue.

 {{{
 #!python
 from django.test import TestCase
 from django.db import models

 class A(models.Model): pass
 class B(A): pass

 class R(models.Model):
  b = models.ForeignKey(B, related_name="r")


 class T(TestCase):
  def test(self):
 b = B.objects.create()
 r = R.objects.create(b=b)
 # Fails: produces 2 queries
 self.assertNumQueries(1, lambda: list(R.objects.filter(b=b)))
 # Fails: produces 2 queries
 self.assertNumQueries(1, lambda: list(b.r.all())


 }}}

 The extra queries seem to be generated by `RelatedField._pk_trace()`.

-- 
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.