Gavin Newsom - Online Name - Debt Consolidation - Pinnacle Sports Review - PT Cruiser

PDA

View Full Version : MSQL error


fryman
Oct 11th 2005, 9:43 pm
After doing a check on all my tables I got these 2 errors:

Problems with indexes of table `category`
UNIQUE and INDEX keys should not both be set for column `name`
Problems with indexes of table `user`
UNIQUE and INDEX keys should not both be set for column `username`

Is this something I should be concerned about? How can I fix it?

EDIT: sorry, please move this post to the database board

digitalpoint
Oct 11th 2005, 10:08 pm
It's basically a waste of resources if you have two indexes that are indexing identical columns. For example, if both indexes for category are indexing just the one "name" column, I would just drop the index that is NOT the UNIQUE one (since there are more validation restrictions on that one). The UNIQUE one can do more (in terms of validation) than the other one, but the other one can't do anything for you that the UNIQUE one doesn't already do.

Confusing enough for ya? :)

fryman
Oct 11th 2005, 10:13 pm
I knew you would stop by this thread :D

Yeah, sure is confusing... so, if I go to phpmyadmin and select the "Repair Table" option will it fix this?

digitalpoint
Oct 11th 2005, 10:29 pm
No... because the table isn't broken, it just has a redundant/extra index. Someone (or something) had to add it, so someone (or something) will have to remove it.

fryman
Oct 11th 2005, 10:36 pm
I see... so, which one should I delete, or how can I find out which one I should delete?

digitalpoint
Oct 11th 2005, 10:37 pm
Attach a screenshot of your index list for that table. :)