开发者

How to find out which script is running a MySQL query?

开发者 https://www.devze.com 2023-01-14 12:30 出处:网络
So I need to fix a query in a large application that I\'m not familiar with. The application 开发者_如何学JAVAis live, and the issue is urgent. The query is killing our server. I found the query that

So I need to fix a query in a large application that I'm not familiar with. The application 开发者_如何学JAVAis live, and the issue is urgent. The query is killing our server. I found the query that is causing the issue, and I know how to fix it. I found it in phpMyAdmin's status or SHOW processlist. But I don't know which script is actually running it. The application is built in .NET, ASP.


Ideally the application is using a specific username(s) that could be used to trace that it is the cause of the delay. Sometimes large queries in MySQL need to be refactored using better indexes or broken into smaller steps that involve temporary table creation and then querying of the temporary tables.

0

精彩评论

暂无评论...
验证码 换一张
取 消