简体   繁体   中英

AWS RDS Param long_query_time set 0 but still no slow_logs

I have configured AWS RDS with the following parameters:

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 gives the following output:

[!!] 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)

I'm getting very few slow query logs. I think I should be get one for every query. How do I fix this?

  • Login to your AWS console and go to RDS.
  • From the left menu, select Parameter Groups
  • Create a new parameter group for Postgres, by copying the default Postgres parameter group
  • Edit the following parameters in the new group:
  • Parameter Name Value
  • log_min_duration_statement 250
  • log_statement none
  • log_duration 0

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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