Search code examples
mysqlinnodb

Convert a relational (InnoDB) database to an in-memory (Memory) database in MySQL


I am trying to perform a couple of operations on my databases (Disk-based & In-memory) such as removing trailing spaces, joining ordering, aggregate, filter etc. Considering that I have obtained a disk-based database with dummy data is there a way to copy this data into an In-memory database so I can be able to compare the different speeds of the operations between the two databases in MySQL? P.s this is for my research. TIA


Solution

  • To create a table and fill it from another table:

    CREATE TABLE ... (...) ENGINE=...
        SELECT ... FROM other_table;