分类: LINUX
2008-05-30 17:25:11
mysql HEAP MEMORY tables 提高行数支持的方法
别人问到的 记一下
mysql MEMORY tables 如果目前支持的行数到上限还不够用 可以把 my.cnf 配置里面
max_heap_table_size = 256M
改大
设置 MAX_ROWS
在跑着 可以 ALTER TABLE tbl_name MAX_ROWS=
MAX_ROWS 依赖于 max_heap_table_size 设置
相关帮助:
max_heap_table_size
This variable sets the maximum size to which MEMORY tables are allowed to grow.
The value of the variable is used to calculate MEMORY table MAX_ROWS values.
Setting this variable has no effect on any existing MEMORY table,
unless the table is re-created with a statement such as CREATE TABLE or
altered with ALTER TABLE or TRUNCATE TABLE.
The MEMORY (HEAP) Storage Engine
MEMORY tables are never converted to disk tables. To ensure that you
don't accidentally do anything foolish, you can set the max_heap_table_size
system variable to impose a maximum size on MEMORY tables. For individual tables,
you can also specify a MAX_ROWS table option in the CREATE TABLE statement.