Re: [Django] #26964: No mention of index_together on the GenericForeignKey section

2018-09-14 Thread Django
#26964: No mention of index_together on the GenericForeignKey section
---+--
 Reporter:  Aidan Lister   |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  Documentation  |  Version:  1.9
 Severity:  Normal |   Resolution:  duplicate
 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 Daniel Hahler):

 @Aidan:

 > Once we'd resolved that, we noticed a contrib app had no index either
 (django reversion).

 I've created https://github.com/etianen/django-reversion/issues/754 to
 track this - would be good if you could provide more info there, e.g. when
 this is needed/useful.

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


Re: [Django] #26964: No mention of index_together on the GenericForeignKey section

2016-07-28 Thread Django
#26964: No mention of index_together on the GenericForeignKey section
---+--
 Reporter:  aidanlister|Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Documentation  |  Version:  1.9
 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
---+--
Changes (by aidanlister):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Old description:

> We've been troubleshooting a performance issue and noticed that there was
> no index on an important GenericForiegnKey.
>
> Once we'd resolved that, we noticed a contrib app had no index either
> (django reversion).
>
> It seems like this should be mentioned in the documentation here:
>
> https://docs.djangoproject.com/en/1.9/ref/contrib/contenttypes/#generic-
> relations
>
> Suggested wording:
>
> If you plan to search for child objects which have a generic relation to
> your parent object, e.g. find all tags linked to a piece of content, then
> you should consider adding a database index on the content type and
> object ID using ``index_together``
> (https://docs.djangoproject.com/en/1.9/ref/models/options/#index-
> together). Django does not do this for you automatically as it does with
> ForeignKey's.
>
> In the example above, this would look like:
>
> class Meta:
> index_together = [
> ["content_type", "object_id"],
> ]

New description:

 We've been troubleshooting a performance issue and noticed that there was
 no index on an important GenericForiegnKey.

 Once we'd resolved that, we noticed a contrib app had no index either
 (django reversion).

 It seems like this should be mentioned in the documentation here:

 https://docs.djangoproject.com/en/1.9/ref/contrib/contenttypes/#generic-
 relations

 Suggested wording:

 If you plan to search for child objects which have a generic relation to
 your parent object, e.g. find all tags linked to a piece of content, then
 you should consider adding a database index on the content type and object
 ID using index_together
 (https://docs.djangoproject.com/en/1.9/ref/models/options/#index-
 together). Django does not do this for you automatically as it does with
 ForeignKey's.

 In the example above, this would look like:

 
 class Meta:
 index_together = [
 ["content_type", "object_id"],
 ]
 

--

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


Re: [Django] #26964: No mention of index_together on the GenericForeignKey section

2016-07-27 Thread Django
#26964: No mention of index_together on the GenericForeignKey section
---+--
 Reporter:  aidanlister|Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  Documentation  |  Version:  1.9
 Severity:  Normal |   Resolution:  duplicate
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  1  |UI/UX:  0
---+--
Changes (by timgraham):

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


Comment:

 I'll mark this as a duplicate of #23435 which suggests we might change the
 behavior and automatically add the index you describe. Feel free to give
 that implementation a try or to submit a documentation PR referencing that
 ticket (commit message = "Refs #23435 -- ").

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


Re: [Django] #26964: No mention of index_together on the GenericForeignKey section

2016-07-27 Thread Django
#26964: No mention of index_together on the GenericForeignKey section
---+--
 Reporter:  aidanlister|Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Documentation  |  Version:  1.9
 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
---+--
Description changed by aidanlister:

Old description:

> We've been troubleshooting a performance issue and noticed that there was
> no index on an important GenericForiegnKey.
>
> Once we'd resolved that, we noticed a contrib app had no index either
> (django reversion).
>
> It seems like this should be mentioned in the documentation here:
>
> https://docs.djangoproject.com/en/1.9/ref/contrib/contenttypes/#generic-
> relations
>
> Suggested wording:
>
> If you plan to search for child objects which have a generic relation to
> your parent object, e.g. find all tags linked to a piece of content, then
> you should consider adding a database index on the content type and
> object ID using index_together
> (https://docs.djangoproject.com/en/1.9/ref/models/options/#index-
> together). Django does not do this for you automatically as it does with
> ForeignKey's.
>
> In the example above, this would look like:
>
> ```
> class Meta:
> index_together = [
> ["content_type", "object_id"],
> ]
> ```

New description:

 We've been troubleshooting a performance issue and noticed that there was
 no index on an important GenericForiegnKey.

 Once we'd resolved that, we noticed a contrib app had no index either
 (django reversion).

 It seems like this should be mentioned in the documentation here:

 https://docs.djangoproject.com/en/1.9/ref/contrib/contenttypes/#generic-
 relations

 Suggested wording:

 If you plan to search for child objects which have a generic relation to
 your parent object, e.g. find all tags linked to a piece of content, then
 you should consider adding a database index on the content type and object
 ID using index_together
 (https://docs.djangoproject.com/en/1.9/ref/models/options/#index-
 together). Django does not do this for you automatically as it does with
 ForeignKey's.

 In the example above, this would look like:

 {{{
 class Meta:
 index_together = [
 ["content_type", "object_id"],
 ]
 }}}

--

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


Re: [Django] #26964: No mention of index_together on the GenericForeignKey section

2016-07-27 Thread Django
#26964: No mention of index_together on the GenericForeignKey section
---+--
 Reporter:  aidanlister|Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Documentation  |  Version:  1.9
 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
---+--
Description changed by aidanlister:

Old description:

> We've been troubleshooting a performance issue and noticed that there was
> no index on an important GenericForiegnKey.
>
> Once we'd resolved that, we noticed a contrib app had no index either
> (django reversion).
>
> It seems like this should be mentioned in the documentation here:
>
> https://docs.djangoproject.com/en/1.9/ref/contrib/contenttypes/#generic-
> relations
>
> Suggested wording:
>
> If you plan to search for child objects which have a generic relation to
> your parent object, e.g. find all tags linked to a piece of content, then
> you should consider adding a database index on the content type and
> object ID using index_together
> (https://docs.djangoproject.com/en/1.9/ref/models/options/#index-
> together). Django does not do this for you automatically as it does with
> ForeignKey's.
>
> In the example above, this would look like:
>
> 
> class Meta:
> index_together = [
> ["content_type", "object_id"],
> ]
> 

New description:

 We've been troubleshooting a performance issue and noticed that there was
 no index on an important GenericForiegnKey.

 Once we'd resolved that, we noticed a contrib app had no index either
 (django reversion).

 It seems like this should be mentioned in the documentation here:

 https://docs.djangoproject.com/en/1.9/ref/contrib/contenttypes/#generic-
 relations

 Suggested wording:

 If you plan to search for child objects which have a generic relation to
 your parent object, e.g. find all tags linked to a piece of content, then
 you should consider adding a database index on the content type and object
 ID using index_together
 (https://docs.djangoproject.com/en/1.9/ref/models/options/#index-
 together). Django does not do this for you automatically as it does with
 ForeignKey's.

 In the example above, this would look like:

 ```
 class Meta:
 index_together = [
 ["content_type", "object_id"],
 ]
 ```

--

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


[Django] #26964: No mention of index_together on the GenericForeignKey section

2016-07-27 Thread Django
#26964: No mention of index_together on the GenericForeignKey section
---+
 Reporter:  aidanlister|  Owner:  nobody
 Type:  Bug| Status:  new
Component:  Documentation  |Version:  1.9
 Severity:  Normal |   Keywords:
 Triage Stage:  Unreviewed |  Has patch:  0
Easy pickings:  1  |  UI/UX:  0
---+
 We've been troubleshooting a performance issue and noticed that there was
 no index on an important GenericForiegnKey.

 Once we'd resolved that, we noticed a contrib app had no index either
 (django reversion).

 It seems like this should be mentioned in the documentation here:

 https://docs.djangoproject.com/en/1.9/ref/contrib/contenttypes/#generic-
 relations

 Suggested wording:

 If you plan to search for child objects which have a generic relation to
 your parent object, e.g. find all tags linked to a piece of content, then
 you should consider adding a database index on the content type and object
 ID using ``index_together``
 (https://docs.djangoproject.com/en/1.9/ref/models/options/#index-
 together). Django does not do this for you automatically as it does with
 ForeignKey's.

 In the example above, this would look like:

 class Meta:
 index_together = [
 ["content_type", "object_id"],
 ]

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