MySQL or file system caching issue

is there a noticeable difference in speed when caching data that you fetch from the database to a file on the filesystem (ex: htdocs / cache / cachefile) rather than grabbing it directly from the MySQL database?

Thank you so much!

+2


source to share


4 answers


It very much depends on your disk I / O, the size of your database, your database configuration, your database link, database optimization, etc. etc. Therefore, there is no definitive answer to this question.



You might want to consider memcached for your caching problem. Since you have not provided any information about the actual problem, I doubt you will get answers to your problems. Or do you just want to know if disk-io is faster than mysql? ;-)

+2


source


Yes. What you are describing is a common method for speeding up web applications.



0


source


The noticeable speedup issue also depends on the types of requests and the frequency. If this is a request once a day, perhaps not much. If it's the same request over and over, then it's probably more than that.

0


source


If you only want to use the database to cache the mysql memory table , this might be a good alternative. This should give you the benefits of a sql database without using a hard drive. If you don't need sql database, in general memcached is a great solution.

0


source







All Articles