我有个数据表,要求插入,更新和查询效率高(只是根据主键查询),最好毫秒以下速度。于是我尝试了下Memory存储引擎,发现每次只能插入2000多条记录,同时报错,the table is full.我知道这个是因为表慢了,我修改了max_heap_table_size(默认16M),然后alter table mytable max_rows = xxx ,测试了下,这2个参数修改都生效了,但是重新测试,还是没有效果,跟没有修改时一样,只能插入2000多条记录,然后就报错the table xxx is full。谁知道什么原因,谢谢。

解决方案 »

  1.   

    搞不懂什么原因,版本是MYSQL 5.1.31.
      

  2.   

    A bigint(20) primary key.
    B varchar(2000),
    c varchar(500),
    d tinyint(2).
    怎么计算,就这4个字段,A上建了唯一索引
      

  3.   

    The memory needed for one row in a MEMORY table is calculated using the following expression: SUM_OVER_ALL_BTREE_KEYS(max_length_of_key + sizeof(char*) × 4)
    + SUM_OVER_ALL_HASH_KEYS(sizeof(char*) × 2)
    + ALIGN(length_of_row+1, sizeof(char*))