[e][e]Table Types
MyISAM. MyIsam is the default MySql table type. It is not transactional, so any query wanting to update a MyIsam table must wait in a queue. This is bad for transactional systems, but great for a data-warehouse, because updates are infrequent and in batches, and SELECT statements can run much faster when they don't have to worry about transactions.
Also MyIsam can merge separate tables, allowing for data partitioning.
Also MyIsam can compress tables: which saves space, but more importantly reduces disk I/O, so speeds up queries.
InnoDB. MySql also supports the InnoDB table-type (actually maintained by another software company, InnoDB Inc., (bought by Oracle in late 2005)), which is transactional (A,C,I, & D).
Merge Tables.
- In summary: having merge tables can speed up concurrent queries where they are disk-bound, but it will not help much with serial queries, and can make certain queries much slower. The other big advantage is keeping table-sizes manageable.
- Speed advantages: Merge tables can help speed in the following ways: (1) if you have concurrent queries then a merge table spread across multiple disks can answer the two queries more quickly: it can look for both answers, on different disks, simultaneously; (2) if you access the underlying tables directly, this should be quicker, because the indexes mysql can use will be smaller , or mysql could use different indexes -- this requires application logic to know which table to address. This is where a merge table differs from a *partition*: if the table was partitioned, then mysql would know which data was in which table, so could go just to the relevant tables. With merge tables mysql is completely ignorant of the type of data in each table.
- Speed disadvantages: (1) Some index lookups are slower, because it has to check the indexes of all the underlying tables: specifically "eq_ref" lookups are slower by factor n (=num merged tables), "ref" lookups are not much slower -- so generally it's best to join from a merge table, and not join to it -- this makes merge tables ; (2) splitting the data and index files will not speed things up in itself, because mysql doesn't need to cache entire index or data files, it will just cache the parts that it needs.
- The documentation has a good summary of their advantages & disadvantages.
Column Space Usage.
Numeric Types [mysql.com]