Demystifying Database Performance Issues with SQLCommenter

Track: Tools and Techniques

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. sqlcommenter 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 sqlcommenter with an application that uses Knex to diagnose query performance. We’ll also look at other frameworks and ORMs that sqlcommenter supports, how you can comment your SQL statements if you don’t use an ORM, and how you can view this data in database logs and observability tools.

Jan Kleinert

Jan Kleinert leads a team of Developer Advocates as part of Google Cloud, focusing on Compute and Databases. Prior to joining Google, she worked in a variety of roles ranging from developer relations to web analytics and conversion optimization.