You are on page 1of 1

Memory

The Memory storage engine, also known historically as the Heap storage engine, is an in-memory
only table that does not provide data persistence. The Memory storage engine is actually used internally
by the mysql kernel when a temporary table is required.
Key Features
Very fast, in memory
Non-transactional
Supports the hash index by default
Btree indexes also supported
Ideal for primary key lookups
Limitations
Does not support transactions
Table level locking on DML and DDL statements
Data not persistent
Does not support TEXT/BLOB data types
Fixed row width
No ability to limit the total amount of memory for all Memory tables
Important Parameters
max_heap_table_size: Defi nes the maximum size of a single Memory table.
tmp_table_size: Defi nes the maximum size of the table when used for internally temporary
tables.
init_fi le: Defi nes a SQL fi le of commands that are executed when the MySQL instance is
started. Used as a means to seed Memory tables.
Example Table Usage
The syntax for creating a Memory table (as shown in Listing 3-9) is identical to previous examples

You might also like