0

I am currently developing a system where data access is of key. I have optimized the database so my objects only populate ids and lazily gets additional info on request. The database contains a few million records and I need to improve the data access to a few milliseconds on each query. I was wondering is it possible to cache everything in the database at start-up instead of query caching as our queries are created dynamically. If you have an extensive amount of memory. If I can get the database to do this caching then it would remove the requirement for caching on the app server and simplify some development. I was thinking of setting up a Linux server with a virtual disk on top of the memory and then using MySQL Replication to replicate all on a separate server, so you at least have a backup for when the server crashes and your in mem db gets lost :)

I don't want to have to worry about stale objects, thus if anyone knows of a method of achieving this, it would be greatly appreciated.

0

1 Answer 1

1

May be try the Memcached?

Sign up to request clarification or add additional context in comments.

1 Comment

FYI - tried RamDisk which emulates a disk drive in memory which creates and ISO of the disk on shut down and loads it on start-up. This appeared to be a solution with quite some hefty benefits, but unfortunately the speed was only improved by aprox 5%, because the app servers/MySQL caching strategies already take the best advantage of the memory. This was just a speed experiment and is definitely not viable option for caching. MySQL 5.5 takes full advantage of the memory you allocate to it, which improved performance tremendously (10 fold) after the first access of the data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.