MySQL Forums
Forum List  »  Performance

Re: Is index needed or not?
Posted by: Bogdan Ursu
Date: January 20, 2010 12:37AM

Thanks for your clarification.
The `item_id` is not unique in this table. It's a foreign key to another table (namely `items`) in which it is the PRIMARY key.
However, in this table (`items_type`) the (`item_id`, `type`) pair is unique, so that's why I chose it to be the PRIMARY key.
I hope it all makes more sense now.
Still, I suppose that does not change anything you said and I still need to DROP the `item_id` KEY since it currently slows down INSERTs and adds no extra performance to SELECTs.

Free Flash Components at http://flashxml.net

Options: ReplyQuote


Subject
Views
Written By
Posted
3196
January 18, 2010 08:20AM
1383
January 19, 2010 09:18PM
Re: Is index needed or not?
1474
January 20, 2010 12:37AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.