使用 drupal 优化和压缩 mysql 数据库
我用本地语言(utf-8)开发了一个新闻网站,该网站平均每天有 28,000 个用户。该网站最近开始显示很多错误并且速度变慢。我接到主机的电话,说数据库使用了近 150GB 的空间。我认为这对于数据库来说太多了,并且认为存在严重错误,但我无法理解它可能是什么。该站点在 Drupal 中,数据库是 Mysql(innoDb)。任何人都可以指示我应该做什么吗?
更新:似乎 innoDb 转储正在使用该空间。对此我们能做些什么呢?处理这个问题的标准程序是什么?
I have developed a news website in a local language(utf-8) which server average 28k users a day. The site has recently started to show much errors and slow down. I got a call from the host saying that the db is using almost 150GB of space. I believe its way too much for the db and think there something critically wrong however i cannot understand what it could be. The site is in Drupal and the db is Mysql(innoDb). Can any one give directions as to what i should do.
UPDATE: Seems like innoDb dump is using the space. What can be done about it? Whats the standard procedure to deal with this issue.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该问题没有足够的信息来给出具体答案,也许您的代码多次将相同的数据写入数据库,也许您正在记录到表并且日志变得非常大,也许有人设法访问您的网站/DB 并滥用它。
您需要登录数据库并检查哪个表占用了最多空间。使用
显示表状态
(链接)它将告诉您每个表的大小。然后手动检查表中的数据,找出问题所在。The question does not have enough info for a specific answer, maybe your code is writing the same data to the DB multiple times, maybe you are logging to the table and the logs have become very big, maybe somebody managed to get access to your site/DB and is misusing it.
You need to login to your database and check which table is taking the most space. Use
SHOW TABLE STATUS
(link) which will tell you the size of each table. Then manually check the data in the table to figure out what is wrong.