MySQL Forums
Forum List  »  MyISAM

Re: InnoDB to MyIsam Migration - What will happen to Foreign keys ?
Posted by: Rick James
Date: November 25, 2009 11:28PM

A FOREIGN KEY gives you two things:
* Protection from certain coding mistakes -- presumably you have fixed all of them by now, so you don't need PKs for that.
* CASCADING DELETEs, etc. Triggers might work -- if your provider allows triggers. Probably better to code them yourself. You knew what had to be done when you added the CASCADE clause; now you simply have to do it in code.

You will lose BEGIN...COMMIT functionality. Generally that can be replaced with LOCK...UNLOCK statements, although they are more aggressive -- they lock the table(s), not just the row(s). OTOH, MyISAM is quite fast, so the locks may rarely be a problem.

You may find some SELECTs run faster, some run slower. This is likely to be because INDEXes are implement quite differently between the engines.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: InnoDB to MyIsam Migration - What will happen to Foreign keys ?
2247
November 25, 2009 11:28PM


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.