sql - mysql - MyISAM or InnoDB - Join speed vs Lookup speed -


read question before closing duplicate pls., because there many questions this, @ least didn't find looking for.

what clear now:

 myisam faster @ searching strings (much faster)  innodb faster @ joins (much faster) 

so problem this: have following setup:

two tables, lets t1 having columns id, bla1, bla2, ..., blan; , t2 having columns t1id, extra1, extra2, ..., extran.

table 1 (t1) innodb (needs transactions on that's clear). table 2 (t2) used t1 (is data specific cases), there join between ever t2 appears. point innodb. thing after join search done (always) string inside 1 of columns. point myisam.

time sum between join time , search time. problem if optimize 1 make other slower.

bonus facts: tables really big, t2 never needs transactions, row lock or whatever impose innodb.

what better choice? myisam or innodb?

the way sure create 2 tables, load them sample data , measure queries.

in general recommend use innodb:

  1. since mysql 5.6 full-text search availiable in innobd (http://dev.mysql.com/doc/refman/5.6/en/fulltext-search.html) think lose myisam fast string search main betefit
  2. with myisam lose not row-locking support foreign keys data integrity + don't forget myisam "crashes"

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -