我在 AWS RDS 实例上有 Mysql DB,并且我有一个慢查询日志,log_queries_not_using_indexes = YES
它正在工作,但几乎每 5 秒一次,这就是我在日志中看到的内容:
SELECT value FROM mysql.rds_heartbeat2;
# Time: 150804 21:00:25
# User@Host: rdsadmin[rdsadmin] @ localhost [127.0.0.1] Id: 1
# Query_time: 0.000154 Lock_time: 0.000058 Rows_sent: 1 Rows_examined: 1
SET timestamp=1438722025;
SELECT NAME, VALUE FROM mysql.rds_configuration;
# Time: 150804 21:00:30
# User@Host: rdsadmin[rdsadmin] @ localhost [127.0.0.1] Id: 1
# Query_time: 0.000233 Lock_time: 0.000113 Rows_sent: 1 Rows_examined: 1
SET timestamp=1438722030;
SELECT count(*) from information_schema.TABLES WHERE TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'rds_heartbeat2';
# User@Host: rdsadmin[rdsadmin] @ localhost [127.0.0.1] Id: 1
# Query_time: 0.000116 Lock_time: 0.000039 Rows_sent: 1 Rows_examined: 1
SET timestamp=1438722030;
SELECT value FROM mysql.rds_heartbeat2;
# Time: 150804 21:00:45
# User@Host: rdsadmin[rdsadmin] @ localhost [127.0.0.1] Id: 1
# Query_time: 0.000238 Lock_time: 0.000116 Rows_sent: 1 Rows_examined: 1
SET timestamp=1438722045;
SELECT count(*) from information_schema.TABLES WHERE TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'rds_heartbeat2';
# User@Host: rdsadmin[rdsadmin] @ localhost [127.0.0.1] Id: 1
# Query_time: 0.000112 Lock_time: 0.000036 Rows_sent: 1 Rows_examined: 1
SET timestamp=1438722045;
SELECT value FROM mysql.rds_heartbeat2;
# Time: 150804 21:01:00
这是什么?
我可能有一两个需要优化的查询,其余的日志文件就是这个。
这与我的数据库有什么关系?这些问题不是我的。我相信这是 AWS 所做的事情,但我不知道它为什么以及如何影响性能。