mysql memory

mysql memory engine

创建:

mysql> create table mt engine = memory select * from information_schema.tables;
Query OK, 334 rows affected (1.80 sec)
Records: 334  Duplicates: 0  Warnings: 0

限制表的大小

alter table mt max_row = 200 ;

或者

set global max_heap_table_size=1024*1024*1024

创建索引

alter table mt add index idx_hash_mt  [using hash(table_name) ];

alter table mt add index idx_btree_mt using btree(table_name);

原文地址:https://www.cnblogs.com/mjorcen/p/4060416.html