Sid3335
09-22-2006, 05:58 AM
I have a large db (mysql) that uses mixed table types, MyISAM and InnoDB.
I need to set up some foreign keys to enforce referential integrity. I'll be running some cascading deletes that will span many tables and it will save me a lot of coding time.
As i understand it MyISAM does not enforce foreign keys, InnoDB does.
I have read that MyISAM is faster than InnoDB.
I will have to change some of the table types to innodb to set up my foreign keys correctly. The db serves many sites, so i'm wondering what kind of performance loss i will get moving to InnoDB.
I do notice that the largest table in my db (2million+ records) is InnoDB but does not require fk's, so my theory is that if my largest table (and probably most frequently used) is running fine using InnoDB i shouldn't worry too much about changing my other smaller tables. Or is it the foreign key that creates the overhead.
Any help/info is appreciated.
I need to set up some foreign keys to enforce referential integrity. I'll be running some cascading deletes that will span many tables and it will save me a lot of coding time.
As i understand it MyISAM does not enforce foreign keys, InnoDB does.
I have read that MyISAM is faster than InnoDB.
I will have to change some of the table types to innodb to set up my foreign keys correctly. The db serves many sites, so i'm wondering what kind of performance loss i will get moving to InnoDB.
I do notice that the largest table in my db (2million+ records) is InnoDB but does not require fk's, so my theory is that if my largest table (and probably most frequently used) is running fine using InnoDB i shouldn't worry too much about changing my other smaller tables. Or is it the foreign key that creates the overhead.
Any help/info is appreciated.