MySQL数据库在性能开始下降之前有多大 [英] How big can a MySQL database get before performance starts to degrade

查看:414
本文介绍了MySQL数据库在性能开始下降之前有多大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MySQL数据库何时开始失去性能?

At what point does a MySQL database start to lose performance?


  • 物理数据库大小是否重要?

  • 记录数量是否重要?

  • 是否任何性能下降呈线性或指数型?

我有我相信是一个大型数据库,大约15M的记录,占用近2GB。根据这些数字,是否有任何激励我清理数据,或者我是安全的,允许它继续扩展几年?

I have what I believe to be a large database, with roughly 15M records which take up almost 2GB. Based on these numbers, is there any incentive for me to clean the data out, or am I safe to allow it to continue scaling for a few more years?

推荐答案

物理数据库大小无关紧要。

The physical database size doesn't matter. The number of records don't matter.

在我的经验中,你要运行的最大的问题不是大小,而是你可以处理的查询数量一次。很可能你必须移动到主/从配置,以便读查询可以针对从设备运行,写查询针对主设备运行。但是,如果您尚未准备好此操作,则可以随时调整正在运行的查询的索引,以加快响应时间。还有很多调整,你可以做的网络栈和内核在Linux中,这将有所帮助。

In my experience the biggest problem that you are going to run in to is not size, but the number of queries you can handle at a time. Most likely you are going to have to move to a master/slave configuration so that the read queries can run against the slaves and the write queries run against the master. However if you are not ready for this yet, you can always tweak your indexes for the queries you are running to speed up the response times. Also there is a lot of tweaking you can do to the network stack and kernel in Linux that will help.

我有我的高达10GB,只有一个中等

I have had mine get up to 10GB, with only a moderate number of connections and it handled the requests just fine.

我将首先关注您的索引,然后让一个服务器管理员看看您的操作系统,如果所有这些都没有处理请求, t帮助它可能是实现主/从配置的时间。

I would focus first on your indexes, then have a server admin look at your OS, and if all that doesn't help it might be time to implement a master/slave configuration.

这篇关于MySQL数据库在性能开始下降之前有多大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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