On 15/04/15 23:45, Kevin Christopher Henry wrote:
This issue was the subject of https://code.djangoproject.com/ticket/24082.
There, the accepted (but not implemented) solution is the same as
suggested here: allowing the user to opt out of the creation of the
additional index with `db_index=False
This issue was the subject of https://code.djangoproject.com/ticket/24082.
There, the accepted (but not implemented) solution is the same as suggested
here: allowing the user to opt out of the creation of the additional index
with `db_index=False`.
On Wednesday, April 15, 2015 at 2:11:25 PM UTC
On 15/04/15 18:22, Tim Graham wrote:
#19441 is the ticket where it was decided that unique=True implies a
database index. The documentation says,
"Note that when ``unique`` is ``True``, you don't need to specify
`Field.db_index`, because ``unique`` implies the creation of an index."
Understo
#19441 is the ticket where it was decided that unique=True implies a
database index. The documentation says,
"Note that when ``unique`` is ``True``, you don't need to
specify`Field.db_index`,
because ``unique`` implies the creation of an index."
Unless we decide that is wrong, I think the cor
On 15/04/15 03:37, Curtis Maloney wrote:
Was the OP referring to the unique index, or the index created for the
LIKE lookups?
I was involved in a discussion recently [was there something on list
too?] wanting to be able to opt-out of the second index because they
knew they didn't need it, and it
I agree this is a bug, and I think it's independent of the discussion of
customisable indexes.
Postgres creates the necessary index for unique constraints automatically
as Tommy said. I'm guessing other backends do too, because the explicit
index creation DDL is omitted when unique is True in t
Was the OP referring to the unique index, or the index created for the LIKE
lookups?
I was involved in a discussion recently [was there something on list too?]
wanting to be able to opt-out of the second index because they knew they
didn't need it, and it was _huge_ on their database.
--
C
On 1
I believe that Postgres will *always* create an index on a column with a
UNIQUE constraint.
regression=> create table yo (id serial primary key, blah varchar(32)
unique);
CREATE TABLE
regression=> \d yo
Table "public.yo"
Column | Type |
Modifiers
-
Using Django 1.8, psycopg2 2.6 and PostgreSQL 9.4.1.
I have a model with a models.TextField(unique=True, db_index=False,
primary_key=False) field in it.
I understand that an index is created because of the comment shown in
this code:
https://github.com/django/django/blob/master/django/db/ba