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? I don't have PostgreSQL installed, but it seems that
SQLite3 and MySQL5 do not create a composite index on UNIQUE
constraint automatically:
1.a If I inspect sqlite_master table or use .indices command, there is no
composite index
1.b If I create a composite index by explicit command, it appears in
sqlite_master table and is listed by .indices command
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
Peter
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---