开发者

MySQL Cache Everything

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 separ开发者_开发技巧ate 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.


May be try the Memcached?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜