LoginSignup
1
1

More than 5 years have passed since last update.

RDS(MySQL 5.6.22 )におけるパラメータ log_queries_not_using_indexes の挙動

Last updated at Posted at 2015-06-25

RDS(MySQL)設定覚書

RDS(MySQL)にてlog_queries_not_using_indexesを1にすると
RDS自身が発行していると思われるクエリがindexが張られていないようで引っかかってしまい
結果的にslow-logが埋もれる。

1時間あたり600回前後
DELETE FROM mysql.rds_sysinfo where name = 'innodb_txn_key';
select table_name from information_schema.tables where table_schema='mysql' and table_type = 'BASE TABLE' and engine = 'MyISAM' and table_name not like '%RDSDUMMY%' and table_name not in ('general_log', 'slow_log', 'general_log_backup', 'slow_log_backup');
SELECT count(*) from information_schema.TABLES WHERE TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'rds_heartbeat2';
SELECT value FROM mysql.rds_heartbeat2;
SELECT count(*) from mysql.rds_history WHERE action = 'disable set master' ORDER BY action_timestamp LIMIT 1;
SELECT count(*) from mysql.rds_replication_status WHERE master_host IS NOT NULL and master_port IS NOT NULL ORDER BY action_timestamp LIMIT 1;
use mysql;
SELECT NAME, VALUE FROM mysql.rds_configuration;

なお、long_query_timeを0.1にしたりすると、同様にちょくちょくRDSのクエリが出力されます。
特に
flush logs;
が5分に1回実行されているようで、0.2~0.3秒掛かりがちです。

結局 log_queries_not_using_indexes は0で、
0.1を超えるやつは埋もれるほどではないので一旦我慢して運用しています。

なんとかなりませんかねー

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1