1. AWS Query Slow Log
Select COUNT (1), user_host from Mysql.slow_log Group by User_host;
Select COUNT (*) from Mysql.slow_log;
mysql> desc Mysql.slow_log;
+----------------+---------------------+------+-----+-------------------+-----------------------------+
| Field | Type | Null | Key | Default | Extra |
+----------------+---------------------+------+-----+-------------------+-----------------------------+
| start_time | Timestamp | NO | | Current_timestamp | On Update Current_timestamp |
| User_host | Mediumtext | NO | | NULL | |
| Query_time | Time | NO | | NULL | |
| Lock_time | Time | NO | | NULL | |
| rows_sent | Int (11) | NO | | NULL | |
| rows_examined | Int (11) | NO | | NULL | |
| db | VARCHAR (512) | NO | | NULL | |
| last_insert_id | Int (11) | NO | | NULL | |
| insert_id | Int (11) | NO | | NULL | |
| server_id | Int (Ten) unsigned | NO | | NULL | |
| Sql_text | Mediumtext | NO | | NULL | |
| thread_id | bigint (+) unsigned | NO | | NULL | |
+----------------+---------------------+------+-----+-------------------+-----------------------------+
Mysql> Select Query_time,sql_text from Mysql.slow_log ORDER BY query_time desc limit 30; --Slow query installation time sequencing
Mysql> Select Query_time,sql_text from Mysql.slow_log where Query_time > ' 00:00:10 '; --Query for slow queries larger than 10s
AWS RDS for MySQL Basic maintenance