mysql命令行设置表内存

1.MySQL内存表容量受两个参数限制,分别是:max_heap_table_size和max_rows

 

2.例如将 max_heap_table_size设置为32MB:
  mysql> set max_heap_table_size=32777216;

 

3.查看系统变量max_heap_table_size可运行下列命令:

  mysql>show variables like '%heap%';

 

4.max_rows则可在create table或alter table语句中进行设置。例如:

  mysql>create table mryT1 (id int) ENGINE=MEMORY max_rows=10000;

  mysql>alter table mryT1 max_rows=20000;

 

转自:https://zhidao.baidu.com/question/1544898057313272107.html

posted @ 2021-11-09 19:52  xueheng_blog  阅读(1022)  评论(0编辑  收藏  举报