MySQL Slow Query

2011年2月13日 发表评论 阅读评论

使用000webhost很危险的地方就是MySQL数据库的问题,一旦MySQL数据库使用过度,或者某一次操作时间过长就会受到000webhost警告邮件,如果继续无视警告邮件很可能账户就要被K。如何应对?

最好的办法就是不使用000webhost自带的数据库,因为000webhost的数据库一个月内总要抽两次风,有时候夜里还抽风。而且使用过度可能帐号会被K,所以我们可以使用其他的免费MySQL数据库,巧妙解决这个问题,参考闪电博客写的这篇文章,对大家肯定会有帮助的:

db4free.net免费MySQL数据库教程,虽然这个数据库有5年的运营经验,但也要注意半个月至少备份一次。

还有,如果不愿意搬的同学们,要注意防止spam垃圾留言攻击,10分钟内上万条的留言,很容易导致你的帐号被K,这也不能怪000webhost,毕竟人家提供的只是免费服务。

闪电博客收到的MySQL Slow Query警告邮件

We have detected that your account executing a slow MySQL queries.

Username: axxx
Domain: shandian.biz
Database: axxx_shan
MySQL User: axxx_shan
MySQL Query: select p.id, p.post_title, p.post_content,p.post_excerpt, p.post_date,  p.comment_count, count(t_r.o

Slow MySQL queries are not allowed, because you share server resources with thousands of other users and your long lasting MySQL queries are slowering the server and other users are having MySQL performance and connectivity problems. Please optimize your MySQL queries as soon as possible.
Here are some good articles how to optimize MySQL queries: http://www.google.com/search?q=optimize+mysql+queries

Good tips how you can optimize your scripts and make our servers run faster:
- Disable all parts of your website that allows anonymous posting, such as open forums, guestbooks. These days automated software fills all open areas of web with junk and content spam and increasing your database size.
- Disable visitors monitoring and tracking (each move of your visitor makes database query)
- Disable all unused modules
- Disable internal stats for your website – use http://www.google.com/analytics/ for example
- You may also logon to the phpMyAdmin and check which table has the most records. Then, if you think that this table does not contain any valuable information (such as logs, stats or cache), you can click on the `Empty` or `Truncate` icon to clean it.

We thank you for understanding,
www.000webhost.com


转载请注明来自:[闪电博客]http://shandian.biz/287.html

  1. 闪电博客
    2011年2月28日21:59 | #1

    000webhost最棒啦,国内的朋友好好珍惜!