How to make the mysql MEMORY ENGINE store more data?

PHOTO EMBED

Thu May 27 2021 02:29:57 GMT+0000 (Coordinated Universal Time)

Saved by @onlinecesaref #mysql

# /etc/my.cnf
# Raise max size to 4GB
SET GLOBAL tmp_table_size = 1024 * 1024 * 1024 * 4;
SET GLOBAL max_heap_table_size = 1024 * 1024 * 1024 * 4;
# If you are checking the above variables with
SELECT @@max_heap_table_size;
# Or
SHOW VARIABLES LIKE 'max_heap_table_size"

# If already a memory table, the alter will not change anything.
# Only apply the new max size.
ALTER TABLE table_name ENGINE=MEMORY;
content_copyCOPY