1 CREATE TABLE' m ' (2`int`int(Ten) unsigned not NULLAuto_increment,3' Name 'varchar(Ten) not NULL,4' CTime 'int(Ten) not NULL,5' Ltime 'int(Ten) not NULL,6 PRIMARY KEY(`int`),7 UNIQUE KEY' name ' (' name '),8 KEY' Idx_ctime ' (' CTime ') USING BTREE,9 KEY' Idx_ltime ' (' ltime ') USING HASHTen) ENGINE=MEMORYDEFAULTCHARSET=Latin1
- The MEMORY table engine supports btree/hash of two indexes, but text/bolb two types of fields are not supported.
- The memory meter engine data is stored in RAM, and when the database restarts the data is lost, there is only one. frm file to hold the table structure. So the table structure is still there after the reboot.
- The memory table maximum value is limited by the system variable Max_heap_table_size, the default is 16MB, to change the memory table size limit, you need to change the value of max_heap_table_size. You can also set the maximum number of rows for a table by using the Max_Rows option of the CREATE TABLE, but the max_heap_table_size takes precedence over max_rows, and when both exist for maximum compatibility, you need to Max_heap_table_ Size sets a reasonable value.
Mysql MEMORY Engine