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.

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