views:

43

answers:

1

Does the MEMORY storage engine of MySQL ever write to disk the database contents?

Meaning, if I'm using the MEMORY storage engine and my database server loses power - do I lose all of my database content or is it backed up to disk?

+2  A: 

According to the documentation,

As indicated by the name, MEMORY tables are stored in memory. They use hash indexes by default, which makes them very fast, and very useful for creating temporary tables. However, when the server shuts down, all rows stored in MEMORY tables are lost. The tables themselves continue to exist because their definitions are stored in .frm files on disk, but they are empty when the server restarts.

Steven Schlansker