randyboy writes:
> Hi,
>
> I'm looking into the prospects of running a MySQL db out a RAM disk. I
> guess the simplest way of doing that would be to copy the db files into
> memory and starting MySQL using the files in memory. However, I run into
> problems with having to update both the db files in memory and the db
> files on disk while the system is running. I suppose that also requires
> me to run a second instance of MySQL in order to manipulate the db files
> on disk. How have other implemented a db in RAMdisk? Is there (hopefully
> there is) a better way than what I've just described?
>
> tia
> r.
>
>
>
>
HI!
It would be easier for you if you would you one instance of MySQL
server, do not use any RAM disk, then on start-up create HEAP tables
(available with 3.23.xx) and copy disk tables to HEAP tables. Then,
all you have to do is run insert/update/delete to both copies of
tables, while SELECT's would be run from the HEAP tables.
Do take into account the limitations of HEAP tables.
Sinisa
+----------------------------------------------------------------------+
| TcX ____ __ _____ _____ ___ == mysql@stripped |
| /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic |
| /*/ /*/ /*/ \*\_ |*| |*||*| mailto:sinisa@stripped|
| /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Larnaka, Cyprus |
| /*/ /*/ /*/\*\_/*/ \*\_/*/ |*|____ |
| ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^ |
| /*/ \*\ Developers Team |
+----------------------------------------------------------------------+