您的位置:首页 > 博客中心 > 数据库 >

mysql memory

时间:2022-03-14 01:44

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);

 

热门排行

今日推荐

热门手游