更改MySQL中的max_heap_table_size值?
max_heap_table_size是同时具有读/写属性的系统变量。
最初,max_heap_table_size的大小为16MB。首先,检查max_heap_table_size的值(以字节为单位)。
查询如下-
mysql> select @@max_heap_table_size;
以下是输出-
+-----------------------+ | @@max_heap_table_size | +-----------------------+ | 16777216 | +-----------------------+ 1 row in set (0.00 sec)
现在让我们如何将值16777216字节=16MB-
1 MB = 1024KB 1KB = 1024 Bytes 1MB = 1024*1024 bytes. To convert 16777216 byte to MB you need to divide 1024*1024. =16777216/(1024*1024) =16777216/1048576 =16 MB
现在,您可以使用SET命令更改max_heap_table_size。语法如下-
SET @@@@max_heap_table_size=yourNumberOfBytes.
让我们更改max_heap_table_size的值。字节数为33554432,等于32MB。
查询如下-
mysql> set @@max_heap_table_size=33554432;
现在检查@@max_heap_table_size的值。查询如下-
mysql> select @@max_heap_table_size;
以下是输出-
+-----------------------+ | @@max_heap_table_size | +-----------------------+ | 33554432 | +-----------------------+ 1 row in set (0.00 sec)
让我们看看它是否等于32MB。上面讨论了这里使用的公式-
mysql> select @@max_heap_table_size/1048576 as MB;
以下是输出-
+---------+ | MB | +---------+ | 32.0000 | +---------+ 1 row in set (0.00 sec)
热门推荐
1 带狗狗训练
4 听力训练狗狗
6 怎训练狗狗
7 腹肌训练狗狗
8 网球训练狗狗
9 记叙文训练狗狗
10 狗狗太凶怎么训练
11 核心力量训练狗狗
12 狗狗乱叫怎么训练
13 发音训练狗狗
14 怎么训练狗狗叼东西给主人
15 荆州训练狗狗
16 篮球训练狗狗
17 做训练狗狗
18 训练狗狗坐姿