March 12, 2012

MySQL Memory engine index

By default, Memory Engine uses Hash index type to index the table, which will make it pretty much unusable and very slow performer for prefix matches and range look-ups.

By default, Memory Engine uses Hash index type to index the table, which will make it pretty much unusable and very slow performer for prefix matches and range look-ups.

Changing the index type to BTree, would dramatically boost the speed and performance.

TABLE lookup
(id INT, INDEX USING BTREE (id))
ENGINE = MEMORY;

Check out this post from Percona for further information and bench marking.

comments powered by Disqus
comments powered by Disqus