Jan Kleinert - Google - Percona Live 2021
Have you ever tried to troubleshoot a database performance issue in an application that was built using an ORM? ORMs can simplify development of applications that communicate with databases, but since the ORMs are generating the SQL statements, it can be difficult to determine which application code is resulting in slow queries.
SQL Commenter is an open source library that enables ORMs to augment SQL statements with comments about the code that caused its execution, making it easier to correlate your application code with the SQL statements that were generated by the ORM.
In this session, we will demonstrate how to set up and use SQL Commenter with an application that uses Sequelize.js to diagnose query performance. We’ll also touch on the other frameworks and ORMs that sqlcommenter supports as well as how you can view this data in db logs and observability tools, including Cloud SQL Insights. β