mysql - When MyISAM is better than InnoDB? -


sometimes got asked on interviews: benefits innodb have against myisam , when myisam better innodb? it's clear first part of question: innodb transaction compliant, row-level blocking instead of table-level blocking, foreign key support , others, these points came mind immidiately.

but when myisam better innodb?

myisam better innodb when don't need advanced features and storage speed more important other concerns. myisam allows full-text searches performed inside database engine itself, instead of needing query results , search them array or whatever in application.

innodb reasonable choice if need store data high degree of fidelity complicated interactions , relationships. myisam reasonable choice if need save or load large number of records in small amount of time.

i wouldn't recommend using myisam data matters. it's great logging or comments fields or don't particularly care if record vanishes twisting nether. innodb when care data, don't need fast searches , have use mysql.

it's worth mentioning innodb supports row-level locking, while myisam supports table-level locking - many common situations, innodb can dramatically faster due more queries executing in parallel.

the bottom line: use innodb unless absolutely have use myisam. alternatively, develop against postgresql , best of both.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -