MySQL - Put a table in memory

By xngo on June 18, 2019

When you want to be able to access a table superfast, you put that table in the RAM. Here is how you do it in MySQL.

CREATE TABLE new_table ENGINE=MEMORY AS SELECT * FROM old_table;

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.