MySQL Forums
Forum List  »  Performance

how to find out all sql and table of running transaction
Posted by: elison chen
Date: December 17, 2015 01:30AM

hi, all:
I found some running transaction using below sql ,i want to tuning that,but i don't known the sql and table information of this transaction,how to find out it?

root@localhost)[(none)]>select 'innodb_trx',
-> trx_id,
-> trx_mysql_thread_id thread_id,
-> trx_state,
-> timestampdiff(second, trx_started, now()) trx_elap_sec,
-> timestampdiff(second, trx_wait_started, now()) wait_sec,
-> trx_rows_locked rows_locked,
-> trx_rows_modified rows_modified,
-> substring(trx_query, 1, 60)
-> from information_schema.innodb_trx
-> order by trx_elap_sec desc, wait_sec desc;

innodb_trx 8A006C5D 10088406 RUNNING 80169 NULL 2 7 NULL
innodb_trx 8AF4D6D4 10119037 RUNNING 10 NULL 0 0 NULL
innodb_trx 8AF4F536 10143800 RUNNING 8 NULL 0 0 NULL
innodb_trx 8AF532C3 10122351 RUNNING 5 NULL 0 0 NULL
innodb_trx 8AF527F9 10119038 RUNNING 5 NULL 0 0 NULL
innodb_trx 8AF532F9 10119034 RUNNING 5 NULL 2 0 NULL
innodb_trx 8AF532B6 10122352 RUNNING 5 NULL 0 0 NULL
innodb_trx 8AF532B7 10143801 RUNNING 5 NULL 2 0 NULL
innodb_trx 8AF58175 10119043 RUNNING 1 NULL 0 0 NULL
innodb_trx 8AF57880 10119036 RUNNING 1 NULL 0 0 NULL
innodb_trx 8AF5789D 10245006 RUNNING 1 NULL 2 0 NULL
innodb_trx 8AF5873C 10132546 RUNNING 0 NULL 0 0 SELECT COUNT(*) FROM ((SELECT F01, F02, F03, F04, F05, F06,
innodb_trx 8AF5864C 10132503 RUNNING 0 NULL 0 0 SELECT * FROM ((SELECT F01, F02, F03, F04, F05, F06, F07, F0
innodb_trx 8AF58672 10132542 RUNNING 0 NULL 0 0 SELECT * FROM ((SELECT F01, F02, F03, F04, F05, F06, F07, F0

Options: ReplyQuote


Subject
Views
Written By
Posted
how to find out all sql and table of running transaction
1611
December 17, 2015 01:30AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.