INNODB vs MYISAM
Posted by: mikesz (116.252.104.---)
Date: August 14, 2008 12:33PM

Hello and Greetings,

I have been running a WAMP server for some time on my Windows XP Pro
box. Over time I have gone through some issues about which WAMP to use
and last Year converted my Apache2Triad installation to WAMP5. All of
my database installations, out of preference, have been MYISAM as I
didn't see the need for INNODB on my local system. In fact, when I did
the WAMP5 installation, it defaulted to INNODB and I reconfigured it
to be MYISAM.

I recently discovered that WAMP5 is now simply WAMPSERVER and its
pretty much plug and play with a bunch of "customization" modules that
you can generate pretty much any combination of installations you can
possibly want. I simply chose the default as I like to try to keep
things simple which means that I am now running an INNODB server. I
have not noticed any problems with all the MYISAM databases either
running locally or uploading them to my live server and am wondering
what the possible implications are for mixing and matching structures.
I see now that if I add a table to an MYISAM database, it gets added
as an INNODB table so I have a mix and match in the same database.

Do I need to be worrying about this? What are the consequences? Do I need to reinstall and reconfigure for MyISAM to maintain consistency?

I am just thinking now that I do support work for Social Networking products so I have about 100 client databases that are MyISAM and need to stay consistent with my client sites were are ALL MyISAM.

If I have to reinstall, what is the issue with interim databases I have worked on that have has INNODB tables created and going back to MyISAM?


TIA for any wisdom.

Options: ReplyQuote
Re: INNODB vs MYISAM
Posted by: yfastud (Moderator)
Date: August 14, 2008 01:20PM

myisam is better for high read volumes, innodb for high update volumes due to table vs row locking, so myisam is running much faster than innodb but you might have problem w/ myisam if you have very big db

innodb is journaled, and can recover from crashes where myisam can't, much like NTFS vs FAT file systems.

myisam has full-text indexing, innodb doesn't.

innodb has transaction support, commits and rollbacks, myisam lacks these.

the best part is you can copy and paste db folder w/ myisam, but not w/ innodb

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: INNODB vs MYISAM
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: August 14, 2008 01:32PM

HI. as you said. wamp is not set with INNODB as standard, but it wont effect you using MyISAM databases. You can set which one you want in Phpmyadmin. its just the default is INNODB now,

if you import a MyISAM database it will continue using the MyISAM engine,So you dont need to worry.

one way to look at the differences is - if you dont know the differences - you dont need to know the differences. more complex tables using reltionships to other tables with keys etc need INNODB. but for standard databases MyISAM IS faster.

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: INNODB vs MYISAM
Posted by: mikesz (116.252.101.---)
Date: August 14, 2008 02:15PM

Thanks for the replies. When I switched from Apache2Triad, I installed WAMP5 and discovered that it defaulted to INNODB, so I changed it in my.ini and commented out all the INNODB calls. I ran it very well until a few weeks ago when I discovered the WAMPSERVER switch. Is it a better thing now to reset the default to MyISAM like I did with WAMP5 or just leave it in INNODB mode? Or does it not matter? I am just concerned and definitely wishing to avoid any possibility of corruption potential with mixing and matching datebase structures. The new databases that are being created are INNODB and I am not sure that is a good thing for the work I am doing.

TIA, mikesz

Options: ReplyQuote
Re: INNODB vs MYISAM
Posted by: mikesz (116.252.101.---)
Date: August 14, 2008 02:17PM

Steven,


Can I get a hint on how to change the default Engine in phpMyAdmin. I was not aware that you could do that, I have only manually made such changes in the config file in the past.

Thanks, mikesz

Options: ReplyQuote
Re: INNODB vs MYISAM
Posted by: Mchl (---.neoplus.adsl.tpnet.pl)
Date: August 14, 2008 02:38PM

You can (and in fact should) explicitly state which engine you wish to use when creating a table.
See CREATE TABLE syntax in mySQL docs
[dev.mysql.com]


If you're using phpMyAdmin, there's an option to select the engine while creating a table



Edited 2 time(s). Last edit at 08/14/2008 02:41PM by Mchl.

Options: ReplyQuote
Re: INNODB vs MYISAM
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: August 14, 2008 02:52PM

in c:/wamp/bin/mysql/my.ini open in and change

default storage engine= INNODB

change it to MyISAM

Then all new databases will my MyISAM. in phpmyadmin you can still change it to any one othe types of engines you want

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: INNODB vs MYISAM
Posted by: mikesz (116.1.235.---)
Date: August 14, 2008 06:06PM

Thanks, that is how I have been doing it.

I did some more detective work and discovered that if you allow the INNODB default, update existing tables or add new ones to your existing ISAM tables, then decided to reconfigure to MYISAM, anything you did in INNODB will be corrupted and your database will error out until you restore your original MYISAM database or you delete the tables and databases you created in INNODB and redo them as MYISAM.

Every table and database I created since I did the installation of the WAMPSERVER was corrupt when I changed the default from INNODB to MYISAM. Fortunately, I had backups and reduncy to restore so the damage is easily repaired.

So, the lesson for me I guess is if you are a MYISAM operation, you shouldn't "tinker" with INNODB.

I am guessing that I could have avoided this by installing two MySQL modules and configure it for MYISAM or if I need INNODB at some point I can install another MySQL module and configure it for what I need. I have three other version of MySQL running so it wouldn't be a big deal to add another one.

I was surprised though about the corruption. All of the tables that I installed had "In Use" messages where the statistics are usually displayed in phpMyAdmin.

FYI

Thanks again. Mikesz

Options: ReplyQuote
Re: INNODB vs MYISAM
Posted by: Mchl (---.neoplus.adsl.tpnet.pl)
Date: August 14, 2008 07:14PM

I had such a situation before when I was tinkering with default mysql server settings. Suddenly no InnoDB tables were accessible. However I just made clean install of wampserver and I got my data back.

MySQL says you can use any storage engine combination you wish, and that's probably true, however it seems it's not wise to change a default engine setting once you started.

Options: ReplyQuote
Re: INNODB vs MYISAM
Posted by: mikesz (116.1.226.---)
Date: August 15, 2008 06:25AM

I agree OR change the default BEFORE you do anything else, eye rolling smiley

Options: ReplyQuote
Re: INNODB vs MYISAM
Posted by: mikesz (116.1.226.---)
Date: August 15, 2008 06:45AM

Actually, I think I might have complicated things a bit here a got a bad result from it. I didn't JUST switch to MYISAM. I disabled all the INNODB calls in my.ini as well. Anybody have any experience with this?

TIA, mikesz

Options: ReplyQuote
Re: INNODB vs MYISAM
Posted by: mikesz (116.252.108.---)
Date: August 15, 2008 02:33PM

Correct me if I am wrong. I need to get this clear in my head. The my.ini configuration file can be setup for both MYISAM and INNODB with no ill affects or problem with compatibility. I disable all the INNODB parameters because I thought it was a problem and apparently is it not. In fact if I had not disabled them, I could have switched back to INNODB and would have had no problem with accessing the work I had done. With some care, I could have Databases setup for INNODB and some setup for MYISAM and just switch the default engine when ever I want to work on either, is this a correct assumption?

TIA, mikesz

Options: ReplyQuote


Sorry, only registered users may post in this forum.