08/14: MySQL > TYPE=HEAPを指定する
Category: Web dev
Posted by: hajime osako
The MySQL table types
CREATE TABLE heap2 TYPE=HEAP SELECT name FROM myisam1;
ALTER TABLE heap2 ADD INDEX(name);
* HEAP indexes cannot be built on BLOB or TEXT fields
* HEAP tables cannot use partial keys (prefixes)
* HEAP tables do not support AUTO_INCREMENT fields
* HEAP indexes can only use the '=' and '<=>' operators
* HEAP indexes cannot be used to return an 'ORDER BY' result.
* HEAP indexes cannot provide information on how many records are between two results, which would assist the optimizer in its choice of index.
CREATE TABLE heap2 TYPE=HEAP SELECT name FROM myisam1;
ALTER TABLE heap2 ADD INDEX(name);
* HEAP indexes cannot be built on BLOB or TEXT fields
* HEAP tables cannot use partial keys (prefixes)
* HEAP tables do not support AUTO_INCREMENT fields
* HEAP indexes can only use the '=' and '<=>' operators
* HEAP indexes cannot be used to return an 'ORDER BY' result.
* HEAP indexes cannot provide information on how many records are between two results, which would assist the optimizer in its choice of index.