A
A
aamorozov2014-08-26 17:10:49
MySQL
aamorozov, 2014-08-26 17:10:49

Is it possible in MySQL to store part of a table in RAM?

There is a server with 128GB of RAM on which MySQL is installed.
And there is also a database, with a very tangible daily increase in data.
Actually in the database there are several tables partitioned by months (MyIsam).
Tell me, is it possible to make it so that, for example, the data for the last three months were not just saved in the database, but were in RAM, for quick access to them. It's just that the data of interest lies in the last three partitions. But at the same time, you need to store all the data for several years .... Actually, it is of interest how to implement the above. Thanks in advance for your advice.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
Optimus, 2014-08-26
Pyan @marrk2

Read: https://ru.wikipedia.org/wiki/Redis

P
PoopZemli, 2014-08-26
@PoopZemli

A preliminary search showed that this is not possible. But you can create a table on the memory engine and update it regularly, adding new records and deleting old ones.

S
Sergey Petrikov, 2014-08-26
@RicoX

Firstly, if it is possible to convert to Innodb (XtraDB), it’s more interesting, turn on the innodb_file_per_table option, then set up partitioning (partitioning) of your tables by months, for each month we get a separate set of files in the database, then there are options, you can create a partition in tmpfs at start to drive the necessary partitions there and link to the base directory (not very safe, you need to think about the crutch of periodically dumping data to disk), I personally did a similar trick with my ears, but not on one server, but on several, and on the main base lived in a good raid with cached, but on the slave in ridonly, such a partition was created in ram and the necessary part of the base was driven there, the engine read from the slave, but wrote to the master, there the feature of the loads was 95R / 5W. In your case, a serious architect is needed - this is not a question for a toaster,

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question