MySQL DBA Script – Monitoring MySQL Application (SQL) efficiency: Latency and Throughput

Troubleshooting MySQL performance for both Latency and Throughput (MySQL DBA Scripts)


Overview

Being a full-time MySQL Performance Engineer, the most important part of my job is troubleshooting MySQL performance using the relevant matrix for Root Cause Analysis of performance bottlenecks. In MySQL, The Performance_Schema and SYS are a plethora of data useful for the performance health checks, forensics and diagnostics of Database Infrastructure Operations. In this post, I wanted to identify the most expensive SQLs in MySQL by Memory (RAM) consumption. I also wanted to understand how MySQL locks and wait events influence Response Time/Latency and Throughput, so I included details like LOCK TYPE, LOCK MODE, LOCKED DATA, etc.

MySQL DBA Script for troubleshooting SQL performance (latency & throughput), Also understanding how MySQL Locks and Wait Events are influencing performance:

About Shiv Iyer 446 Articles
Open Source Database Systems Engineer with a deep understanding of Optimizer Internals, Performance Engineering, Scalability and Data SRE. Shiv currently is the Founder, Investor, Board Member and CEO of multiple Database Systems Infrastructure Operations companies in the Transaction Processing Computing and ColumnStores ecosystem. He is also a frequent speaker in open source software conferences globally.