缓存Mysql数据库以获得更好的性能

发布于 2024-08-26 10:37:54 字数 166 浏览 4 评论 0原文

我正在使用亚马逊云,但由于 HDD 不在我的计算机上,因此出现性能问题。 我的数据库很小(~500MB),我有能力将其全部保存在 RAM 中。 我不想将查询保留在 RAM 中,我需要那里的所有表。

我该怎么做?

谢谢, 科比

P.S. 我用的是ubuntu服务器...

I'm using Amazon cloud and I've performance issue since the HDD is not located on my machine.
My database is small (~500MB) and I can afford to keep it all in my RAM.
I do not want to keep queries in my RAM, i need all the tables there.

How can i do it?

Thanks,
Koby

P.S.
I'm using ubuntu server...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

治碍 2024-09-02 10:37:54

您可以添加一个缓存层。 Memcached 可能是您的不错选择:

http://memcached.org/

You could add a caching layer. Memcached might be a good choice for you:

http://memcached.org/

眼泪也成诗 2024-09-02 10:37:54

可以将索引加载到缓存中;如果您有经常查询的小型 ISAM 表,MySQL 可能也会将它们加载到缓存中。这是一篇关于 MySQL 调优的性能 Wiki 文章

You can load indexes into cache; if you have small ISAM tables that are frequently queried, MySQL will probably load these into cache as well. Here is a good Performance Wiki article on MySQL tuning.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文