Peter Matulis <[EMAIL PROTECTED]> wrote on 11/15/2005 02:47:56 PM: > I am still trying to create a schema. I do not get errors when I do > so but in phpmyadmin I get these types of warning for five tables: > > table 1: > UNIQUE and INDEX keys should not both be set for column `email` > > table 2: > More than one INDEX key was created for column `mail_id` > More than one INDEX key was created for column `rid` > > table 3: > More than one INDEX key was created for column `sid` > > table 4: > More than one INDEX key was created for column `preference` > > table 5: > UNIQUE and INDEX keys should not both be set for column `email` > > > Should I be worried about this? > >
Only if you care about the speed of your INSERTs and how much space your data+indexes take on your hard drives. If you don't care about either of those performance factors, then no, you don't need to worry about those warnings. UNIQUE is not simply a constraint in MySQL it is an index, too. So you don't need to say CREATE TABLE example ( ,a int ,b int ,UNIQUE(b) ,KEY(b) ); Because b is already indexed by the UNIQUE. Shawn Green Database Administrator Unimin Corporation - Spruce Pine