缓存问题 MySQL 或文件系统 [英] Caching question MySQL or Filesystem

查看:50
本文介绍了缓存问题 MySQL 或文件系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

缓存检索到的数据时是否存在明显的速度性能差异从数据库到文件系统上的文件(例如:htdocs/cache/cachefile)而不是直接从 MySQL DB 中抓取?

is there a noticeable speed performance difference when you cache the data which you retrieve from the database to a file on the filesystem (eg.: htdocs/cache/cachefile) rather than grabbing it directy from the MySQL DB?

非常感谢!

推荐答案

这很大程度上取决于你的磁盘 IO、数据库大小、数据库配置、数据库链接、数据库优化等. 所以没有明确的答案.

This highly depends on your disk IO, the size of your database, the database configuration, the link to your database, the optimization of the database, etc, etc. So there is no definitive answer to that.

您可能需要考虑使用 memcached 来解决您遇到的缓存问题.由于您没有提供有关实际问题的信息,我怀疑您是否会得到很好的答案来解决您的问题.或者你只是想知道disk-io是否比mysql快?;-)

You might want to consider memcached for your caching problem you have. Since you provided no information about the actual issue i'm in doubt you'll get good answers to resolve your problem. Or do you just want to know if disk-io is faster than mysql? ;-)

这篇关于缓存问题 MySQL 或文件系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆