繁体   English   中英

AWS RDS参数long_query_time设置为0,但仍然没有slow_logs

[英]AWS RDS Param long_query_time set 0 but still no slow_logs

我已使用以下参数配置了AWS RDS:

join_buffer_size: 67108864
log_queries_not_using_indexes: 1
long_query_time: 0
query_cache_size: 67108864
query_cache_type: 1
slow_query_log: 1

Mysqltuner提供以下输出:

[!!] Slow queries: 98% (764K/772K)
[OK] Highest usage of available connections: 1% (51/5082)
[OK] Key buffer size / total MyISAM indexes: 16.0M/420.5M
[OK] Key buffer hit rate: 98.1% (41M cached / 789K reads)
[OK] Query cache efficiency: 70.2% (381K cached / 543K selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (50 temp sorts / 85K sorts)
[!!] Joins performed without indexes: 3023
[OK] Temporary tables created on disk: 2% (1K on disk / 67K total)
[OK] Thread cache hit rate: 99% (51 created / 47K connections)
[OK] Table cache hit rate: 25% (1K open / 6K opened)
[OK] Open file limit used: 1% (1K/65K)
[OK] Table locks acquired immediately: 98% (985K immediate / 998K locks)

我收到很少的慢查询日志。 我想我应该为每个查询得到一个。 我该如何解决?

  • 登录到您的AWS控制台并转到RDS。
  • 从左侧菜单中选择“参数组”
  • 通过复制默认的Postgres参数组为Postgres创建一个新的参数组
  • 在新组中编辑以下参数:
  • 参数名称值
  • log_min_duration_statement 250
  • log_statement无
  • log_duration 0

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM