Hi, I got this note from my host today. Don't know hardly anything about the guts of a database so I'm wondering where it went wrong. Fortunately I started a new active blog and this one was just up for archives. I had to take down the database (after backing it up) before they would let my site back up. Here's the note:
I was monitoring the server that hosts your account and while reviewing the logs noticed that your website was consuming a very high percentage of the server resources (processors' time and memory usage), thus endangered the overall performance of all the sites on the server. I've conducted and investigation on the reason for the high resource consumption and it turned out that your application executes slow queries towards its database, which eventually hogs the server. This happens because other processes stay in the queue waiting for the processors to execute the slow queries and free memory for them. While they are waiting however, they stack up which further increases the problem.
The reasons for the slow queries can be several:
1. Large database
2. Not well written scripts
3. Large number of internal links that query the database directly.
Unpon further checking it turned out that the following queries are slow:
SELECT *,
TABLE_SCHEMA AS Db,
TABLE_NAME AS Name,
ENGINE AS Engine,
ENGINE AS Type,
VERSION AS Version,
ROW_FORMAT AS Row_format,
TABLE_ROWS AS Rows,
AVG_ROW_LENGTH AS Avg_row_length,
DATA_LENGTH AS Data_length,
MAX_DATA_LENGTH AS Max_data_length,
INDEX_LENGTH AS Index_length,
DATA_FREE AS Data_free,
AUTO_INCREMENT AS Auto_increment,
CREATE_TIME AS Create_time,
UPDATE_TIME AS Update_time,
CHECK_TIME AS Check_time,
TABLE_COLLATION AS Collation,
CHECKSUM AS Checksum,
CREATE_OPTIONS AS Create_options,
TABLE_COMMENT AS Comment
FROM information_schema.TABLES
WHERE TABLE_SCHEMA IN ('*database name*');