[Solved] MySQL database takes too long to load page first time

Bobby WW Asks: MySQL database takes too long to load page first time
MySQL database takes too long to load page for the first time, especially if I leave the page for an hour or so. Subsequent refreshes after the first one, load immediately. The first time can take 10 seconds or more.

I am just using below web page for simple testing –

Code:
select count(*) from $tablename

Could the dB be on idle or something (its seems like it is) and how can I get the first page loading quickly. Could it be a caching setting for the dB? New to this work. Thanks for any help.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.