MySQL Forums
Forum List  »  Newbie

How to write simple indexes vs composite indexes
Posted by: yvonne kire
Date: February 07, 2014 04:11PM

-> PRIMARY KEY (`id`),
-> -> PRIMARY KEY (`id`),
-> KEY `i_preview_tracking_batch_id` (`batch_id`),
-> KEY `i_preview_tracking_file_id` (`file_id`),
-> KEY `i_preview_tracking_user_id` (`user_account_id`)

Would it be more benificial to add the 3 indexes into one index?
I think it's called " composite indexes "

ie
-> KEY `i_preview_tracking_3_idx` (`batch_id`,file_id`,`user_account_id`)

would it save space?
would it do the same work
or would it be better to leave it as is ?

Options: ReplyQuote


Subject
Written By
Posted
How to write simple indexes vs composite indexes
February 07, 2014 04:11PM


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.