Click here to get back home

which storage engine should I use- MyISAM or InnoDB?

 HomeNewsGroups | Search | About
 mailing.database.mysql    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
which storage engine should I use- MyISAM or InnoDB? crescent_au 11-06-2006
Get Chitika Premium
Posted by crescent_au on November 6, 2006, 7:36 am
Please log in for more thread options
I've read articles and postings about MyISAM vs InnoDB but I am still a
bit unsure about which storage engine to use for my new project.

I am developing a website in PHP/MySQL, which includes features such as
member login, insert/update/delete operations for members to maintain
their records, report generation based on database entries, shopping
cart but payments will be made through Paypal gateway and the search
facility.

This is a medium level website. What storage engine is best suited for
this site and why? I prefer InnoDB because of foreign key support. I'd
also like to know why MyISAM is not made to support foreign keys? If
you guys recommend MyISAM for me, how should I implement foreign key
support? Do I have to explicitely make provisions for foreign key
support in MyISAM using PHP?

Thanks


Posted by lark on November 8, 2006, 3:00 pm
Please log in for more thread options
crescent_au@yahoo.com wrote:
> I've read articles and postings about MyISAM vs InnoDB but I am still a
> bit unsure about which storage engine to use for my new project.
>
> I am developing a website in PHP/MySQL, which includes features such as
> member login, insert/update/delete operations for members to maintain
> their records, report generation based on database entries, shopping
> cart but payments will be made through Paypal gateway and the search
> facility.
>
> This is a medium level website. What storage engine is best suited for
> this site and why? I prefer InnoDB because of foreign key support. I'd
> also like to know why MyISAM is not made to support foreign keys? If
> you guys recommend MyISAM for me, how should I implement foreign key
> support? Do I have to explicitely make provisions for foreign key
> support in MyISAM using PHP?
>
> Thanks
>

you need to look at what makes each engine unique:

myisam -- fast for reading and inserting, table level lock which makes
it not suitable for transactions
innodb -- fast for updating and most suitable for transactions because
it uses row level locks

you certainly can use a combination of these 2 types of engines in your
database.

with innodb, you'll have cascading deletes/updates; however with myisam,
you'll have to do it yourself in the code or in stored procedures. so
maybe some of your tables should be innodb while others should be myisam.

hope this helps.

Posted by The|Godfather on November 9, 2006, 5:42 pm
Please log in for more thread options
I would recommend InnoDB because it is ACID compliant , thus very
needed for your site (you want to implement all-or-nothing bank-style
behaviour right?).

However, I noticed that InnoDB tables get a bit slower than MyISAM
tables during bulk-inserts ,especially of TEXT/Blobs and Varchars. It
is all relative. It depends what fields you want to store, how many
writes / reads and so on.

However, InnoDB is not the universal solution to any solution. You will
probably end-up using both types, especially if you write some log
information, which is not of critical importance.
Hope it helps.




Dragomir Stanchev
http://www.linkedin.com/in/dragomirstanchev
http://www.student.informatik.tu-darmstadt.de/~stanchev/CV%20deutsch.pdf


Similar ThreadsPosted
How to fix error 134 from storage engine October 15, 2006, 2:11 pm
MyISAM versus Innodb - help me!! July 6, 2005, 12:46 pm
Changing Tables from MyISAM to InnoDB... Cautions? December 8, 2005, 5:08 pm
innodb being skipped without skip-innodb December 28, 2006, 4:03 pm
MyISAM engine: worst case scenario in case of crash (mysql, O/S, hardware, whatever) November 8, 2006, 11:23 pm
Efficient Storage of IP Address September 14, 2005, 9:58 pm
How can mySQL only use 1 byte for storage? August 14, 2006, 2:08 pm
storage optimization for read-only table November 6, 2006, 10:29 am
Saving storage space on blank entries in DB October 31, 2005, 2:10 am
Deadlock handling in InnoDB September 7, 2005, 8:46 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap