Wednesday, June 11, 2008

InnoDB v/s MyISAM

InnoDb
1) recovers from crash/ shutdowns by replying its logs. Hence, InnoDB approach is approximately fixed time.
2) Caches reads and writes to data rows within the engine itself.
3) Stores data rows physically in primary key order. Uses MS SQL Server featrue of "Clustered Indexes."
4) Doesnt support compression and terse rowformats.
5) Can be used for tables which needs performance and data security.

MyISAM
1) fully scans and repairs any indexes which had been updated. Time taken using MyISAM approach depends on the size of the data files.
2) Relies on OS for caching reads and writes to data rows.
3) Stores data rows mostly in the order in which they are added. Uses Oracle feature known as "Index Organized Tables".
4) Support compression and terse rowformats.
5) Can be used for tables which are used for search purposes.


The last point is possible b making the database as InnoDB and selective tables in that DB as MyISAM. This is possible in MySQL

No comments: