douyan8070 2013-02-04 23:43
浏览 23

MySQL查询突然放缓

I'm having a PHP script that streams some data over the Internet and stores it in a MySQL table, then another Processing script that runs as a cron job every minute that reads the raw data, processes it and inserts the results into other tables (depending the type of data extracted).

The processing script has around 10 queries (INSERTs and UPDATEs). It usually handles around 2000 entries of raw data in milliseconds. But sometimes it has some unusual sudden slow down (about once a week) where it can only handle about 200 raw entries in a minute.

This lasts for a couple of hours; then it goes back to normal.

I'm running my own instance of MySQL on a shared server and according to my web host, the server load has been very low during these slow downs.

I tried restarting MySQL server during those slow downs but that didn't help.

Any help is appreciated. And thanks in advance.

  • 写回答

1条回答 默认 最新

  • doubian19900911 2013-02-04 23:59
    关注

    There are to less information to give you an good answer.

    • Server OS and MySQL Version
    • MySQL configuration
    • Other servives that run on the server
    • Server Hardware
    • SQL Query's you run

    The first you can do ist use EXPLAIN Statement to get an quick overview

    评论

报告相同问题?

悬赏问题

  • ¥30 eclipse开启服务后,网页无法打开
  • ¥30 雷达辐射源信号参考模型
  • ¥15 html+css+js如何实现这样子的效果?
  • ¥15 STM32单片机自主设计
  • ¥15 如何在node.js中或者java中给wav格式的音频编码成sil格式呢
  • ¥15 不小心不正规的开发公司导致不给我们y码,
  • ¥15 我的代码无法在vc++中运行呀,错误很多
  • ¥50 求一个win系统下运行的可自动抓取arm64架构deb安装包和其依赖包的软件。
  • ¥60 fail to initialize keyboard hotkeys through kernel.0000000000
  • ¥30 ppOCRLabel导出识别结果失败