Re: unique_together and composite columns indexing

2007-08-30 Thread Peter Melvyn
On 8/30/07, Peter Melvyn <[EMAIL PROTECTED]> wrote: > 2.a If I let MySQL to explain a select command from such table, there is no >composite index listed > 2.a If I create a composite index by explicit command, it is listed by explain >command among available indices You are righ

Re: unique_together and composite columns indexing

2007-08-30 Thread Peter Melvyn
On 8/30/07, Nis Jørgensen <[EMAIL PROTECTED]> wrote: > > CREATE INDEX `xxx_amodel_col_a_col_b` > >ON `wss_amodel` (`col_a`,`col_b`); > > Postgresql will implicitly generate this index when it encounters the > UNIQUE constraint. My guess is that other backends will do the same. Are you sure?

Re: unique_together and composite columns indexing

2007-08-30 Thread Nis Jørgensen
Peter Melvyn skrev: > Hi all, > > if I'm not mistaken, if I have a model with unique constraint > 'unique_together', Django does not support composite index of related > columns, i.e. > > class AModel (models.Model): > col_a = models.CharField(maxlength=20, db_index=True) > col_b = models.

unique_together and composite columns indexing

2007-08-18 Thread Peter Melvyn
Hi all, if I'm not mistaken, if I have a model with unique constraint 'unique_together', Django does not support composite index of related columns, i.e. class AModel (models.Model): col_a = models.CharField(maxlength=20, db_index=True) col_b = models.CharField(maxlength=20, db_index=Tru