Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2024-03-10 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  Akash
 Type:   |  Kumar Sen
  Cleanup/optimization   |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  db-indexes   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

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

Comment:

 Replying to [comment:32 django tester]:

 Please don't close ticket without any feedback.
-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018e2bc4529d-5f34550e-0104-434c-ace7-4624b1ad1913-00%40eu-central-1.amazonses.com.


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2024-03-10 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  Akash
 Type:   |  Kumar Sen
  Cleanup/optimization   |   Status:  closed
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  db-indexes   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by django tester):

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

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018e2b519827-906ebefc-cf17-42a3-88a8-6d38dc245bf1-00%40eu-central-1.amazonses.com.


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2024-03-09 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  Akash
 Type:   |  Kumar Sen
  Cleanup/optimization   |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  db-indexes   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Dan LaManna):

 * cc: Dan LaManna (added)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018e241594f7-4dbde80d-2466-490f-973a-de3596ce6219-00%40eu-central-1.amazonses.com.


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2023-06-14 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  Akash
 Type:   |  Kumar Sen
  Cleanup/optimization   |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  db-indexes   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Akash Kumar Sen):

 * needs_better_patch:  0 => 1


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070188bd07963c-eeba88a5-d2bc-418e-856f-0e1e62484283-00%40eu-central-1.amazonses.com.


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2023-06-14 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  Akash
 Type:   |  Kumar Sen
  Cleanup/optimization   |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  db-indexes   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Akash Kumar Sen):

 * owner:  (none) => Akash Kumar Sen
 * needs_better_patch:  1 => 0
 * status:  new => assigned


Comment:

 [https://github.com/django/django/pull/16979 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070188bcef6987-71f632fb-95ae-4078-b92a-940c00bb5c9e-00%40eu-central-1.amazonses.com.


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2023-03-21 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  (none)
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  db-indexes   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * status:  assigned => new


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070187037bdb73-6cb6c961-281a-4852-954d-b54d91c537d9-00%40eu-central-1.amazonses.com.


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2023-03-21 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  (none)
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  db-indexes   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * owner:  bwreilly => (none)
 * 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070187037bcd23-8915645a-5810-4d2b-9248-a788bbebeaf3-00%40eu-central-1.amazonses.com.


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2020-12-20 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  db-indexes   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak):

 #32288 was 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/075.de457607ae87929b944a0bad2a0e8d59%40djangoproject.com.


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2019-01-02 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  db-indexes   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by László Károlyi):

 Replying to [comment:24 Tim Graham]:

 You might want to reconsider having the extraneously-seeming indexes
 removed on the ManyToMany relationships. I just did a
 [https://dev.to/karolyi/django-why-you-might-want-to-set-up-extra-db-
 level-indexes-for-your-manytomany-relationships-1ecg case study] where it
 turned out that MariaDB uses them.

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


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2018-10-30 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  db-indexes   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * needs_better_patch:  0 => 1


Old description:

> Suppose I have the following model:
> class Food(models.Model):
>   restaurants = models.ManyToManyField(Restaurant)
>
> The following table is created:
>
> CREATE TABLE "main_food_restaurants" (
> "id" integer NOT NULL PRIMARY KEY,
> "food_id" integer NOT NULL,
> "restaurant_id" integer NOT NULL,
> UNIQUE ("food_id", "restaurant_id")
> )
>
> and the indexes:
>
> CREATE INDEX "main_food_restaurants_0899c464" ON "main_food_restaurants"
> ("food_id");
> CREATE INDEX "main_food_restaurants_be4c8f84" ON "main_food_restaurants"
> ("restaurant_id");
>
> Notice that  the single index on food_id is not needed due to the unique
> index (food_id, restaurant_id)

New description:

 Suppose I have the following model:
 {{{
 class Food(models.Model):
   restaurants = models.ManyToManyField(Restaurant)
 }}}
 The following table is created:
 {{{
 CREATE TABLE "main_food_restaurants" (
 "id" integer NOT NULL PRIMARY KEY,
 "food_id" integer NOT NULL,
 "restaurant_id" integer NOT NULL,
 UNIQUE ("food_id", "restaurant_id")
 )
 }}}
 and the indexes:
 {{{
 CREATE INDEX "main_food_restaurants_0899c464" ON "main_food_restaurants"
 ("food_id");
 CREATE INDEX "main_food_restaurants_be4c8f84" ON "main_food_restaurants"
 ("restaurant_id");
 }}}
 Notice that  the single index on food_id is not needed due to the unique
 index `(food_id, restaurant_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/075.7ac8a970fec42955e35af96b617971b4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2018-10-25 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  db-indexes   | Triage Stage:  Accepted
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


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


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2018-09-24 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  db-indexes   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Phil Krylov):

 Pull request: https://github.com/django/django/pull/10435

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


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2018-09-24 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  db-indexes   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Phil Krylov):

 * cc: Phil Krylov (added)


Comment:

 Replying to [comment:17 Anssi Kääriäinen]:
 > We should just skip index creation for m2m tables unless the user asks
 for single column index. I am not sure if we should add flags to m2m field
 for creation or skipping of these indexes.
 I would say that if someone needs a single column index in their through
 table,  they can use an explicit through table without `db_index=False` on
 that (`ForeignKey`) column.

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


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2016-09-20 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  db-indexes   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by edmorley):

 * cc: emorley@… (added)


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


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2016-05-15 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  db-indexes   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * keywords:   => db-indexes


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


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2014-08-27 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  new
  Cleanup/optimization   |  Version:  master
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  0
 Keywords:   |  Patch needs improvement:  1
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by timgraham):

 #23367 was 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/075.255773bcfe18c845e4475570fc80c823%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2014-08-12 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  new
  Cleanup/optimization   |  Version:  master
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  0
 Keywords:   |  Patch needs improvement:  1
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by akaariai):

 * needs_better_patch:  0 => 1


Comment:

 I don't think the solution in PR2578 is the right solution at all.

 If I read the patch correctly it removes all indexes for fields that are
 already first element in some unique_together index. There are valid cases
 for asking a separate index for a field even if it is part of an
 unique_together index. The most important reason for this is that a
 single-field index is faster than multicolumn index. In addition we
 shouldn't override what users have asked explicitly.

 We should just skip index creation for m2m tables unless the user asks for
 single column index. I am not sure if we should add flags to m2m field for
 creation or skipping of these indexes.

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


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2014-04-22 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  new
  Cleanup/optimization   |  Version:  master
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  0
 Keywords:   |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by timo):

 * version:  1.6 => master
 * easy:  1 => 0


Comment:

 [https://github.com/django/django/pull/2578 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/075.caec195bf47be951943eb7d45f311fc2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2014-04-20 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  new
  Cleanup/optimization   |  Version:  1.6
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  0
 Keywords:   |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  1|
-+-
Changes (by bwreilly):

 * has_patch:  0 => 1


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


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2014-03-30 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  new
  Cleanup/optimization   |  Version:  1.6
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  0
 Keywords:   |  Patch needs improvement:  0
Has patch:  0|UI/UX:  0
  Needs tests:  0|
Easy pickings:  1|
-+-
Changes (by anonymous):

 * stage:  Unreviewed => Accepted


Comment:

 This seems like a reasonable optimization to me -- at a minimum we can do
 it by adding a new flag to backends and then only performing it on
 databases we've validated have this behavior (you'd have to have a REALLY
 terrible database for index looks not to support a subset of fields with a
 left-side prefix though).

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


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2014-03-22 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  new
  Cleanup/optimization   |  Version:  1.6
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:
 Severity:  Normal   |  Unreviewed
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  1|
-+-
Changes (by anonymous):

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


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


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2014-03-19 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  closed
  Cleanup/optimization   |  Version:  1.6
Component:  Database layer   |   Resolution:  needsinfo
  (models, ORM)  | Triage Stage:
 Severity:  Normal   |  Unreviewed
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  1|
-+-

Comment (by Joshua Yanovski):

 Again, please look at SQL Fiddle.  It allows you to write queries against
 a database of every type mentioned here, including Oracle (and also
 Microsoft SQL Server).  And every single one of them uses the composite
 index for a query that uses only the first indexed column.

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


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2014-03-15 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  closed
  Cleanup/optimization   |  Version:  1.6
Component:  Database layer   |   Resolution:  needsinfo
  (models, ORM)  | Triage Stage:
 Severity:  Normal   |  Unreviewed
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  1|
-+-

Comment (by anonymous):

 By the way, a very quick way to verify is to actually create a compound
 index, and then use "EXPLAIN" to check whether a SELECT statement based on
 the leftmost prefix can make use of the compound index. Of course this is
 assuming you have access to those core DBs, of which Oracle could be a bit
 of a problem.

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


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2014-03-15 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  closed
  Cleanup/optimization   |  Version:  1.6
Component:  Database layer   |   Resolution:  needsinfo
  (models, ORM)  | Triage Stage:
 Severity:  Normal   |  Unreviewed
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  1|
-+-

Comment (by alucard):

 For the core DBs, they usually use B-Tree indexes so I think if [a,b] is
 indexed, then [a] would be a redundant index. To generalize this, any
 leftmost prefix of an indexed tuple would be redundant. This is definitely
 true for MySQL.


 However, for hash indexes (and possibly other types), both [a] and [a,b]
 would be perfectly valid and non-redundant.

 Source: https://dev.mysql.com/doc/refman/5.5/en/index-btree-hash.html
 To quote: "[Hash index] Only whole keys can be used to search for a row.
 (With a B-tree index, any leftmost prefix of the key can be used to find
 rows.)"

 I think we need to have an opt-out on a per table basis (based on Meta
 options), or even better, per ManyToManyField basis (based on a setting to
 __init__)

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


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2014-03-15 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  closed
  Cleanup/optimization   |  Version:  1.6
Component:  Database layer   |   Resolution:  needsinfo
  (models, ORM)  | Triage Stage:
 Severity:  Normal   |  Unreviewed
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  1|
-+-

Comment (by Joshua Yanovski):

 SQL Fiddle may help (I can't link it since it would be marked as spam, but
 the address is pretty easy to determine).  Oracle and MySQL both do this
 as well.

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


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2014-03-15 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  closed
  Cleanup/optimization   |  Version:  1.6
Component:  Database layer   |   Resolution:  needsinfo
  (models, ORM)  | Triage Stage:
 Severity:  Normal   |  Unreviewed
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  1|
-+-

Comment (by bwreilly):

 I've confirmed PostgreSQL and SQLite both exhibit this behavior
 ([https://gist.github.com/anonymous/9575316 Gist]), I'll check MySQL when
 I get a chance. I don't have access to an Oracle instance, but I'll check
 their documentation.

 Additionally, I've fixed the issue with `unique_together=[('a','b','c')]`,
 added tests, and moved the functionality to an overridable method
 ([https://github.com/OneOcean/django/compare/django:master...master
 compare]). Sorry it isn't a pull request at the moment, I'm going to fix
 that Monday.

 Besides [https://docs.djangoproject.com/en/dev/ref/models/options/#unique-
 together Model Meta options unique_together] and
 [https://docs.djangoproject.com/en/dev/ref/models/fields/#db-index Fields
 db_index], should I update the documentation anywhere else?

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


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2014-03-15 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  closed
  Cleanup/optimization   |  Version:  1.6
Component:  Database layer   |   Resolution:  needsinfo
  (models, ORM)  | Triage Stage:
 Severity:  Normal   |  Unreviewed
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  1|
-+-

Comment (by sfrost@…):

 The SQL standard *doesn't talk about indexes*, so claiming that it doesn't
 happen to talk about how unique constraints are implemented is a bit like
 trying to rearrange deck chairs on the Titanic.

 The index is redundant in every database that I've ever come across- and
 any that are sensible will do the same.  How can a unique constraint be at
 all performant if there isn't a fast way to find an existing value?
 Allowing some backend to "opt-out" is fine, but it certainly shouldn't be
 the default.

 Note that only the index on the *first* column would be redundant; an
 independent index on the second or subsequent columns which are included
 in a unique constraint could be quite 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/075.1401d91112a69522086b60bb105e54da%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2014-03-12 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  closed
  Cleanup/optimization   |  Version:  1.6
Component:  Database layer   |   Resolution:  needsinfo
  (models, ORM)  | Triage Stage:
 Severity:  Normal   |  Unreviewed
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  1|
-+-
Changes (by shai):

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


Comment:

 The question of whether an index for the first column of a unique
 constraint is redundant, depends on how the database implements the unique
 constraint. I am quite certain that the SQL standard does not specify,
 that unique constraints must be implemented by indexes which can be used
 partially.

 So, for accepting this change, I'd need some indications that the index is
 actually redundant -- at least in all core backends; hence, needsinfo.
 Even if we accept it, I'd require the code to allow a (3rd-party) backend
 to opt-out of it easily -- that is, with no need to override the entire
 `create_model` method.

 Your code is not a PR, so I can't comment there; I think it will break on
 `unique_together=[('a','b','c')]`. It certainly does need tests (does it
 pass the Django test-suite?) and also documentation changes.

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


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2014-03-08 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  assigned
  Cleanup/optimization   |  Version:  1.6
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:
 Severity:  Normal   |  Unreviewed
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  1|
-+-

Comment (by anonymous):

 looks good, but I can't comment much because I don't know Django ORM
 internals.
 Thanks for the work!

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


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2014-03-08 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  assigned
  Cleanup/optimization   |  Version:  1.6
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:
 Severity:  Normal   |  Unreviewed
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  1|
-+-

Comment (by bwreilly):

 I think this fixes it:
 https://github.com/OneOcean/django/compare/django:master...master

 But I am not sure I am entirely happy with it, and perhaps it needs a
 test. Either way, I'll need to get a CLA and company CLA signed before I
 can make a pull request.

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


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2014-03-02 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  bwreilly
 Type:   |   Status:  assigned
  Cleanup/optimization   |  Version:  1.6
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:
 Severity:  Normal   |  Unreviewed
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  1|
-+-
Changes (by bwreilly):

 * owner:  nobody => bwreilly
 * 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/075.2be91da5dcf7842c851909cb9997a072%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2014-03-01 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |  Version:  1.6
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:
 Severity:  Normal   |  Unreviewed
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  1|
-+-

Comment (by anonymous):

 Let me clarify.
 Suppose you have the following code:

 class B(models.Model):
 pass

 class A(models.Model):
 b = models.ManyToManyField(B)
 ===

 The following SQL is produced:


 CREATE TABLE "main_b" (
 "id" integer NOT NULL PRIMARY KEY
 )
 ;
 CREATE TABLE "main_a_b" (
 "id" integer NOT NULL PRIMARY KEY,
 "a_id" integer NOT NULL,
 "b_id" integer NOT NULL REFERENCES "main_b" ("id"),
 UNIQUE ("a_id", "b_id")
 )
 ;
 CREATE TABLE "main_a" (
 "id" integer NOT NULL PRIMARY KEY
 )

 CREATE INDEX "main_a_b_4d6cc2fb" ON "main_a_b" ("a_id");
 CREATE INDEX "main_a_b_2c14050b" ON "main_a_b" ("b_id");

 ==

 Note that the index on a_id is redundant due to the unique constraint on
 a_id, b_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/075.53ea093e491b3f92117076b3fd81f11b%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #22125: Unnecessary creation of index for ManyToManyField

2014-02-28 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
-+-
 Reporter:  tbhtan3@…|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |  Version:  1.6
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:
 Severity:  Normal   |  Unreviewed
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  1|
-+-
Changes (by ceaess):

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


Comment:

 Is there some of the code missing? I'm not seeing a unique index created
 in the SQL code you have here, just a unique constraint on food_id and
 restaurant_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/075.73707ab0272875c473e4a598c6ad7aca%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Django] #22125: Unnecessary creation of index for ManyToManyField

2014-02-22 Thread Django
#22125: Unnecessary creation of index for ManyToManyField
--+
 Reporter:  tbhtan3@… |  Owner:  nobody
 Type:  Cleanup/optimization  | Status:  new
Component:  Database layer (models, ORM)  |Version:  1.6
 Severity:  Normal|   Keywords:
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  1 |  UI/UX:  0
--+
 Suppose I have the following model:
 class Food(models.Model):
   restaurants = models.ManyToManyField(Restaurant)

 The following table is created:

 CREATE TABLE "main_food_restaurants" (
 "id" integer NOT NULL PRIMARY KEY,
 "food_id" integer NOT NULL,
 "restaurant_id" integer NOT NULL,
 UNIQUE ("food_id", "restaurant_id")
 )

 and the indexes:

 CREATE INDEX "main_food_restaurants_0899c464" ON "main_food_restaurants"
 ("food_id");
 CREATE INDEX "main_food_restaurants_be4c8f84" ON "main_food_restaurants"
 ("restaurant_id");

 Notice that  the single index on food_id is not needed due to the unique
 index (food_id, restaurant_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/060.9e8c47778fece75c4510c5cf78d2659b%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.