How can I identify MySQL slow queries on the PaaS

I have identified PHP scripts that are abnormally long to execute in some cases. (Thanks to the php.access.log)

I’m trying to find which MySQL request is taking so much time (up to 200 sec) and under which conditions.
Is there a way to enable the mysql_slow_query log?

That would be a setting in my.cnf, which doesn’t appear to be supported:
https://docs.platform.sh/configuration/services/mysql.html#adjusting-mariadb-configuration

I’d instead sign up for a trial of New Relic, which should be able to give you the data you need:
https://docs.platform.sh/administration/integrations/new-relic.html#new-relic

1 Like