Memory (storage engine)

MEMORY writes table data in-memory.

MEMORY is designed to store data that must be accessed quickly, for example caches, or intermediate data that needs to be transformed before storing it to regular tables.

In MariaDB and before MySQL 5.6, MEMORY was used for internal temporary tables, e.g. to materialize the intermediate results of a query.

For this reason Percona Server implemented improvements to MEMORY to support BLOB and TEXT.

In MySQL 8.0, by default the TempTable engine is used in place of MEMORY for internal temporary tables.