• Detecting the Source of MySQL Queries with Comments

    As a MySQL DBA I already know the data changes that happen on my system. I have logs for that. However, it’s a common problem that several years into the life of an application, the current developers won’t know where in the codebase queries come from. It’s often hard for them to find the location in the code if queries are formed dynamically; the pattern I show them to optimize doesn’t match anything in the code.