Does it make a difference to read from a file instead of from MySQL?

Posted by Joe Huang on Super User See other posts from Super User or by Joe Huang
Published on 2013-11-01T13:00:08Z Indexed on 2013/11/01 21:58 UTC
Read the original article Hit count: 145

Filed under:
|

My web server currently is quite loaded. And I have a PHP file that is accessed very often remotely. The PHP file basically makes a MySQL query and returns a JSON formatted string.

I am thinking to use a Cron job to write the necessary data into a file every 15 mins, so the PHP file doesn't make a MySQL query, instead it reads from the file.

Does it make a difference? I mean to alleviate the server loading (CPU/MySQL) a bit?

© Super User or respective owner

Related posts about mysql

Related posts about webserver