mysqlamazon-web-servicesperconamysql-slow-query-logamazon-aurora

Filter AuroraMysql slow query log file by specific queries


I downloaded the slow query log file from Aurora Mysql. I want to playback these queries but separate them to just writes and reads. So a tool to extract only selects, or Inserts+Updates would be nice


Solution

  • Found it! we can use pt-query-digest

    pt-query-digest mysql-slowquery.log --no-report --output slowlog --filter '$event->{fingerprint} =~ m/^insert|^update/' > writes-only.log