我如何知道错误日志中MySQL在慢速查询中遇到的页面

How can i know the page from where slow query was hitting in MySQL, like

"SELECT * FROM Users WHERE id=123"

Lets say this query was written on page user.php and on many other pages and this query caught in slow log

Now i need to know the exact page on which this was run from error log

Grep your source code for SELECT * FROM Users WHERE id=.

Change the PHP code to include a comment (/*...*/) in each SELECT to say where it came from. (If the slowlog strips comments, then add on AND 'page5'='page5' as a harmless, but useful, bit of info.)