Skip to content

Instantly share code, notes, and snippets.

View dannyibishev's full-sized avatar
🐒
Monkeying around

Yordan dannyibishev

🐒
Monkeying around
View GitHub Profile
@qiangxue
qiangxue / cloudwatch_log_insights_mysql_slow_query_examples.md
Created October 20, 2020 19:28 — forked from grocky/cloudwatch_log_insights_mysql_slow_query_examples.md
CloudWatch Log Insights query examples for MySQL slow query log.

Filtering queries

Find slowest write queries

parse @message /Query_time: (?<queryTime>.*?) Lock_time: (<?lockTime>.*?) Rows_sent: (?<rowsSent>.*?) Rows_examined: (?<rowsExamined>.*?)\s(?<query>.*?)$/
  | filter @message like /(?i)insert/
  | sort queryTime desc
  | limit 10