Skip navigation links

MySQL Forums :: Memory Storage Engine :: Memory + MAX_ROWS (hash rebuild) quick question


Advanced Search

Memory + MAX_ROWS (hash rebuild) quick question
Posted by: John Nahlen ()
Date: August 11, 2011 11:29PM

For reference, from http://dev.mysql.com/doc/refman/5.5/en/memory-storage-engine.html:
You can also specify a MAX_ROWS table option in CREATE TABLE statements for
MEMORY tables to provide a hint about the number of rows you plan to store in
 them. This does not enable the table to grow beyond the max_heap_table_size
 value, which still acts as a constraint on maximum table size. For maximum 
flexibility in being able to use MAX_ROWS, set max_heap_table_size at least as
 high as the value to which you want each MEMORY table to be able to grow.

I know Hashing (and Hash Indexes for the Memory engine) are complicated subjects, but if nothing else, hopefully the answer to this question will help me understand better:

My current understanding (even as a software engineer) is that for most Hash implementations, (such as a Java HashMap), you must specify an upper-bound for the hash (to avoid the hash from having to be recalculated [rebuilt] every so often for inserts, to maintain O(1) lookup performance). Is that the purpose of MAX_ROWS in the Memory engine?

Thanks,
- John



Edited 1 time(s). Last edit at 08/11/2011 11:30PM by John Nahlen.

Options: ReplyQuote


Subject Views Written By Posted
Memory + MAX_ROWS (hash rebuild) quick question 1924 John Nahlen 08/11/2011 11:29PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.