Currently I have a set of large MEMORY tables, and have previously calculated how much space I believe each will require and assigned max_heap_table_size accordingly so that the sum is not greater than 12GB.

If I were to assign all tables (approx 19x) to have a max_heap_table_size = 12*1024*1024*1024; -- 12GB, then would that then result in MySQL attempting to reserve 228GB of memory, or would it instead allow this however then just run into issues if the tables collectively grew too big?

To rephrase, does MySQL only reserve memory for MEMORY tables as and when it's needed, with max_heap_table_size just used as a throttle on that individual table size if it were to grow too big?

  • For the record - I'm aware that cluster tables may be a better option, but that's a whole other story :) – Simon at My School Portal May 22 '13 at 12:10

max_heap_table_size defines maximum size of table, but mysql do not allocate that in advance.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.