We are running a financial application using MySQL as database.
For performance reasons we are using memory tables for a few of our live tables where the data is populated ever few milli seconds.
To ensure data consistency in all scenarios (planned and unplanned outages) we need to ensure that the data in the memory tables are always persisted for that we are planning to implement shutdown hooks, wherein n case of any shutdown the data would be written in normal tables and restored during start-up.
I am unfortunately not able to find a way to do it.
Any suggestions would be appreciated.
We are using MySQL ver 5.7