#14651: ignored field index creation for fields with unique=True and 
db_index=True
---------------------------------------------------+------------------------
          Reporter:  jordi                         |         Owner:  nobody
            Status:  closed                        |     Milestone:        
         Component:  Database layer (models, ORM)  |       Version:  1.2   
        Resolution:  invalid                       |      Keywords:        
             Stage:  Unreviewed                    |     Has_patch:  0     
        Needs_docs:  0                             |   Needs_tests:  0     
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Changes (by ramiro):

  * status:  new => closed
  * needs_better_patch:  => 0
  * resolution:  => invalid
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 Perhaps this is beacuase of this? (from
 http://www.sqlite.org/lang_createtable.html)

 ''INTEGER PRIMARY KEY columns aside, both UNIQUE and PRIMARY KEY
 constraints are implemented by creating an index in the database (in the
 same way as a "CREATE UNIQUE INDEX" statement would). Such an index is
 used like any other index in the database to optimize queries. As a
 result, there often no advantage (but significant overhead) in creating an
 index on a set of columns that are already collectively subject to a
 UNIQUE or PRIMARY KEY constraint. ''

 Closing the ticket, please reopen if I've misunderstood things.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/14651#comment:1>
Django <http://code.djangoproject.com/>
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to