Just one damn thing after another

yatender.com


Myisam or innodb which one to use where

written by yatender
at 4:45 pm
on September 22, 2009
in technology
no comments

There are no clear guidelines to follow when you have to decide which one is better the old Myisam or the transaction based innodb.  In my experience the choice will differ from application to application and  database operations that are frequently used. 

Innodb comes with all the transactional database goodies and it is the choice if the database will be used as the OLTP with good number of reads and writes on it, It needs foreign key constraints . The table sizes aren’t big and the joins in the queries aren’t many.

But if the number of operations have to read most of the time and the application don’t require transaction control you must not overlook Myisam because it can give the kind of  boost to your databse performance no other DBMS can compete with. Suppose if number of writes are more then every time a table is updated it will be locked for other operation this is not a problem with innodb which is row based.

nnoDB is a largely ACID (Atomicity, Consistency, Isolation, Durability) engine, built to guarantee consistency and durability. It does this through a transaction log (with the option of a two-phase commit if you have the binary log enabled), a double-write buffer and automatic checksumming and checksum validation of database pages.Myisam isn’t crash safe and  if things go wrong getting db from the backup is the only choice.

Never think of mixed engine tables  unless it is absolutely necessary. The mixed type table will give trouble at replication and at the time of backup.Performance analyzing and balancing will be difficult and slow. If a crash happens then  to recover it wont be easy either.


 
 

about this

fineprint
yatender.com uses Wordpress.