Forum Topic

Thanks for your participation and contribution.


Back to MySQL Queries

MySQL Process Information

Post a reply
2541 views
i90runner
i90runner

MySQL Process Information


SELECT t.processlist_id, 
       IF (name = 
'thread/sql/event_scheduler', 'event_scheduler', t.processlist_user) 
       PROCESSLIST_USER, 
       t.processlist_host, 
       t.processlist_db, 
       t.processlist_command, 
       t.processlist_time, 
       t.processlist_state, 
       t.thread_id, 
       t.TYPE, 
       t.name, 
       t.parent_thread_id, 
       t.instrumented, 
       t.processlist_info, 
       a.attr_value 
FROM   performance_schema.threads t 
       left outer join performance_schema.session_connect_attrs a 
                    ON t.processlist_id = a.processlist_id 
                       AND ( a.attr_name IS NULL 
                              OR a.attr_name = 'program_name' ) 
WHERE  t.TYPE <> 'BACKGROUND' 

Last updated

i90runner
i90runner

Simple Process List

select id,
       user,
       host,
       db,
       command,
       time,
       state,
       info
from information_schema.processlist;

Last updated

1-2 of 2

Reply to this discussion

You cannot edit posts or make replies: You should be logged in before you can post.