Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Process list logging

qupear's profile image qupear posted 1 month ago in General Permalink

On a tab named "Host ..." there is a sub-tab named "Processes" and there I can see queries which are active at the time of last refresh. If a query works at least 1-2 seconds I can press F5 and catch query that way but if query is faster then 1 second it becomes inactive faster then I can refresh "Processes" tab and it looks like this query is unnoticed be Heidi "Processes" list. Can this tab of processes be used as some sort of log or it is a wrong way of using this tab? There is no purpose in logging all the queries all the time but when debugging queries I need to turn "ON" logging and then turn it "OFF" somehow. If this is not possible now can you add this function in future? Because this tab of processes is great except that not all queries can be logged.

ansgar's profile image ansgar posted 1 month ago Permalink

The process list is not meant for logging. It just displays a snapshot of the currently running processes on the server. It is impossible to catch all queries done by all processes here, as you would have to refresh that list in milliseconds.

What you can do there is watch out for long running processes, kill these, analyze their query. You can also auto-refresh the list:

Description

If you want to just log all queries by all processes, then you should do that on the server side, with the log option in my.cnf (or my.ini):

[mysqld]
log = path/to/allqueries.log
qupear's profile image qupear posted 1 month ago Permalink

Thank you, your suggested method works, I will use general log then. But if someday you will add this option "Turn log on and off" then we will be able to debug queries faster because it can be done directly in place.

ansgar's profile image ansgar posted 1 month ago Permalink

As said, that makes no sense in the process list.

You can, however, log ever query in your HeidiSQL session. Rightclick the SQL log and activate "Log to file":

Description

Please login to leave a reply, or register at first.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.