MySQL · SQL
SELECT id AS process_id,
user,
host,
db,
command,
time AS running_seconds,
state,
LEFT(info, 200) AS query
FROM information_schema.processlist
WHERE command <> 'Sleep'
AND time > 60
AND id <> CONNECTION_ID()
ORDER BY time DESCThis query is part of the "MySQL health" pack: connect the database in DataRunner and install the whole pack — queries, dashboard and checks — at once.
- Check that ships with it: No query running for more than 60 seconds