tags:

views:

159

answers:

1

Is there any way to prespecify the size of a hash index during the initial table creation. If I know that I may eventually have 200 million unique keys and I don't want to to come to a halt resizing at 100 million can the size be prespecified.

Do any other free databases support presized hash tables?

+1  A: 

Can you explain a bit more about your table and storage engine? Explicit HASH indexes can only be created for tables based on the MEMORY and NDB engines (NDB = MySQL Cluster). Assuming you are not using MySQL Cluster, it seems strange you'd be using the MEMORY storage engine to store millions of rows.

That said, you can add the KEY_BLOCK_SIZE hint when creating indexes, which seems to influence the amount of space used for keys: http://dev.mysql.com/doc/refman/5.1/en/create-index.html However, this has got nothing to do in particular with HASH indexes.

Roland Bouman