Click to See Complete Forum and Search --> : myISAM, innoDB issues


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.

chazzy
09-22-2006, 09:49 AM
faster in what way? InnoDB is a transactional system and usually the bit of slowness it gives back can be compensated for by proper indexes on the table columns.

do you have any indexes out there? what version of mysql are you running?

Sid3335
09-23-2006, 04:07 AM
faster in what way?

I just kept reading that MyISAM is faster, i was just wondering if it would be noticeable.

There are a number of indexes on the db. I'll probably run some tests on a backup db to see the differences.

Heres a decent article i found for anyone that is interested:
http://dev.mysql.com/tech-resources/articles/storage-engine/part_1.html

Sid3335
09-23-2006, 04:09 AM
I'm not at work right now, but i'm pretty sure the mysql version is 4.