Reputation: 3417
I have few static tables, I would like to use caching system, Either Mysql's Query cache or changing database storage to Memory (Heap). I need a advice from experts, Which one will be better? or can I use both?.
DB MySql, Type MyISAM.
Upvotes: 0
Views: 125
Reputation: 777
The query cache is used automatically, although it might not be very large - the default values are quite small. Read https://blogs.oracle.com/dlutz/entry/mysql_query_cache_sizing for some advise on setting it to a sensible value. I have it set to 64 MB.
Memory tables don't save their data - their contents are lost when the server reboots. So if you wanted to use them you would need to do a lot of manual synching with 'real' tables - likely to be unreliable and error prone. I've never used them, in 12 years of programming.
Upvotes: 1