I have a rather database intensive application for a server which is intended to be turned off and on throughout the day. The issue comes at first use of the application after startup; it is slower than intended due to the large volumes of queries.
Once the query cache has taken ahold it is much more efficient and user experience pleasing. Obviously for the user experience I would like this throughout and not after the queries have been cached.
Is it reasonable, in terms of performance and error handling, to run a cron script (php) on startup to execute some queries so they can be cached or is there a method to save the mysql cache and load on the service startup?
Best Answer
please refer to this link? this should answer your question
Yes, 100% reasonable to make use of the MySQL caching system!
How to "warm up" a cold DB server?